JASL  [1.2.0]-2018-09-11
Classes | Public Types | Public Member Functions | List of all members
jasl::basic_string< CharT, Traits, AllocatorT > Class Template Reference
Inheritance diagram for jasl::basic_string< CharT, Traits, AllocatorT >:
jasl::inner::string_view_bridge< basic_string_view< CharT, Traits > >

Public Types

typedef inner::string_view_bridge< basic_string_view< CharT, Traits > > bridge_type
 
typedef bridge_type::bridge_to_type base_type
 
typedef AllocatorT allocator_type
 
- Public Types inherited from jasl::inner::string_view_bridge< basic_string_view< CharT, Traits > >
typedef basic_string_view< CharT, Traits > bridge_to_type
 
typedef basic_string_view< CharT, Traits > ::traits_type traits_type
 
typedef basic_string_view< CharT, Traits > ::value_type value_type
 
typedef basic_string_view< CharT, Traits > ::pointer pointer
 
typedef basic_string_view< CharT, Traits > ::const_pointer const_pointer
 
typedef basic_string_view< CharT, Traits > ::reference reference
 
typedef basic_string_view< CharT, Traits > ::const_reference const_reference
 
typedef basic_string_view< CharT, Traits > ::const_iterator const_iterator
 
typedef basic_string_view< CharT, Traits > ::iterator iterator
 
typedef basic_string_view< CharT, Traits > ::const_reverse_iterator const_reverse_iterator
 
typedef basic_string_view< CharT, Traits > ::reverse_iterator reverse_iterator
 
typedef basic_string_view< CharT, Traits > ::size_type size_type
 
typedef basic_string_view< CharT, Traits > ::difference_type difference_type
 

Public Member Functions

 basic_string (const AllocatorT &a) noexcept(std::is_nothrow_constructible< bridge_type >::value &&std::is_nothrow_copy_constructible< AllocatorT >::value)
 
 basic_string (const CStr &cstr, const AllocatorT &alloc=AllocatorT())
 
 basic_string (const CharT *ptr, size_t size, const AllocatorT &alloc=AllocatorT())
 
template<size_t N>
 basic_string (const CharT(&str)[N]) noexcept(std::is_nothrow_constructible< bridge_type, const CharT *, size_t >::value &&std::is_nothrow_default_constructible< AllocatorT >::value)
 
template<size_t N>
 basic_string (const CharT(&str)[N], const AllocatorT &alloc) noexcept(std::is_nothrow_constructible< bridge_type, const CharT *, size_t >::value &&std::is_nothrow_copy_constructible< AllocatorT >::value)
 
 basic_string (const basic_string &other)
 
 basic_string (const basic_string &other, const AllocatorT &alloc)
 
 basic_string (basic_string &&other) noexcept(std::is_nothrow_move_constructible< bridge_type >::value &&std::is_nothrow_move_constructible< AllocatorT >::value)
 
 basic_string (basic_string &&other, const AllocatorT &alloc)
 
 basic_string (const basic_static_string< CharT, Traits > &ss) noexcept(std::is_nothrow_constructible< bridge_type, const CharT *, size_t >::value &&std::is_nothrow_default_constructible< AllocatorT >::value)
 
 basic_string (const basic_static_string< CharT, Traits > &ss, const AllocatorT &alloc) noexcept(std::is_nothrow_constructible< bridge_type, const CharT *, size_t >::value &&std::is_nothrow_copy_constructible< AllocatorT >::value)
 
template<size_t N>
basic_stringassign (const CharT(&str)[N]) noexcept(bridge_type::is_nothrow_settable)
 
basic_stringassign (const CStr &cstr)
 
basic_stringassign (const basic_string &other)
 
basic_stringassign (basic_string &&other) noexcept(is_noexcept_assign_rvalue)
 
basic_stringassing (const basic_static_string< CharT, Traits > &ss) noexcept(bridge_type::is_nothrow_settable)
 
template<size_t N>
basic_stringoperator= (const CharT(&str)[N]) noexcept
 
basic_stringoperator= (const basic_string &other)
 
basic_stringoperator= (basic_string &&other) noexcept(is_noexcept_assign_rvalue)
 
basic_stringoperator= (const basic_static_string< CharT, Traits > &other) noexcept(bridge_type::is_nothrow_settable)
 
constexpr bool is_static () const noexcept
 
AllocatorT get_alloc () const noexcept(std::is_nothrow_copy_constructible< AllocatorT >::value)
 
void swap (basic_string &other) noexcept((!alloc_traits::propagate_on_container_swap::value||JASL_is_nothrow_swappable_value(AllocatorT)) &&JASL_is_nothrow_swappable_value(bridge_type))
 
basic_string substr (typename bridge_type::size_type pos) const
 
basic_string substr (typename bridge_type::size_type pos, typename bridge_type::size_type count) const
 
- Public Member Functions inherited from jasl::inner::string_view_bridge< basic_string_view< CharT, Traits > >
 operator basic_string_view< CharT, Traits > () const noexcept
 
constexpr const_iterator begin () const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().begin()))
 
constexpr const_iterator end () const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().end()))
 
constexpr const_iterator cbegin () const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().cbegin()))
 
constexpr const_iterator cend () const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().cend()))
 
const_reverse_iterator rbegin () const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().rbegin()))
 
const_reverse_iterator rend () const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().rend()))
 
const_reverse_iterator crbegin () const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().crbegin()))
 
const_reverse_iterator crend () const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().crend()))
 
constexpr size_type size () const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().size()))
 
constexpr size_type length () const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().length()))
 
constexpr size_type max_size () const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().max_size()))
 
constexpr bool empty () const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().empty()))
 
constexpr const_reference operator[] (size_type pos) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >()[pos]))
 
constexpr const_reference at (size_type pos) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().at(pos)))
 
constexpr const_reference front () const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().front()))
 
constexpr const_reference back () const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().back()))
 
constexpr const_pointer data () const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().data()))
 
JASL_CONSTEXPR_CXX14 void remove_prefix (size_type n) noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().remove_prefix(n)))
 
JASL_CONSTEXPR_CXX14 void remove_suffix (size_type n) noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().remove_suffix(n)))
 
size_type copy (value_type *s, size_type n) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().copy(s, n)))
 
size_type copy (value_type *s, size_type n, size_type pos) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().copy(s, n, pos)))
 
constexpr string_view_bridge substr (size_type pos) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().substr(pos)) &&std::is_nothrow_copy_constructible< basic_string_view< CharT, Traits > >::value &&std::is_nothrow_copy_constructible< string_view_bridge >::value)
 
constexpr string_view_bridge substr (size_type pos, size_type n) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().substr(pos, n)) &&std::is_nothrow_copy_constructible< basic_string_view< CharT, Traits > >::value &&std::is_nothrow_copy_constructible< string_view_bridge >::value)
 
constexpr int compare (string_view_bridge s) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().compare(s._sv)))
 
constexpr int compare (size_type pos1, size_type n1, string_view_bridge s) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().compare(pos1, n1, s._sv)))
 
constexpr int compare (size_type pos1, size_type n1, string_view_bridge s, size_type pos2, size_type n2) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().compare(pos1, n1, s._sv, pos2, n2)))
 
constexpr int compare (const value_type *s) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().compare(s)))
 
constexpr int compare (size_type pos1, size_type n1, const value_type *s) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().compare(pos1, n1, s)))
 
constexpr int compare (size_type pos1, size_type n1, const value_type *s, size_type n2) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().compare(pos1, n1, s, n2)))
 
constexpr size_type find (string_view_bridge s) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find(s._sv)))
 
constexpr size_type find (string_view_bridge s, size_type pos) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find(s._sv, pos)))
 
constexpr size_type find (value_type c) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find(c)))
 
constexpr size_type find (value_type c, size_type pos) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find(c, pos)))
 
constexpr size_type find (const value_type *s, size_type pos, size_type n) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find(s, pos, n)))
 
constexpr size_type find (const value_type *s) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find(s)))
 
constexpr size_type find (const value_type *s, size_type pos) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find(s, pos)))
 
constexpr size_type rfind (string_view_bridge s) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().rfind(s._sv)))
 
constexpr size_type rfind (string_view_bridge s, size_type pos) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().rfind(s._sv, pos)))
 
constexpr size_type rfind (value_type c) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().rfind(c)))
 
constexpr size_type rfind (value_type c, size_type pos) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().rfind(c, pos)))
 
constexpr size_type rfind (const value_type *s, size_type pos, size_type n) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().rfind(s, pos, n)))
 
constexpr size_type rfind (const value_type *s) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().rfind(s)))
 
constexpr size_type rfind (const value_type *s, size_type pos) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().rfind(s, pos)))
 
constexpr size_type find_first_of (string_view_bridge s) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find_first_of(s._sv)))
 
constexpr size_type find_first_of (string_view_bridge s, size_type pos) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find_first_of(s._sv, pos)))
 
constexpr size_type find_first_of (value_type c) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find_first_of(c)))
 
constexpr size_type find_first_of (value_type c, size_type pos) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find_first_of(c, pos)))
 
constexpr size_type find_first_of (const value_type *s, size_type pos, size_type n) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find_first_of(s, pos, n)))
 
constexpr size_type find_first_of (const value_type *s) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find_first_of(s)))
 
constexpr size_type find_first_of (const value_type *s, size_type pos) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find_first_of(s, pos)))
 
constexpr size_type find_last_of (string_view_bridge s) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find_last_of(s._sv)))
 
constexpr size_type find_last_of (string_view_bridge s, size_type pos) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find_last_of(s._sv, pos)))
 
constexpr size_type find_last_of (value_type c) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find_last_of(c)))
 
constexpr size_type find_last_of (value_type c, size_type pos) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find_last_of(c, pos)))
 
constexpr size_type find_last_of (const value_type *s, size_type pos, size_type n) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find_last_of(s, pos, n)))
 
constexpr size_type find_last_of (const value_type *s) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find_last_of(s)))
 
constexpr size_type find_last_of (const value_type *s, size_type pos) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find_last_of(s, pos)))
 
constexpr size_type find_first_not_of (string_view_bridge s) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find_first_not_of(s._sv)))
 
constexpr size_type find_first_not_of (string_view_bridge s, size_type pos) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find_first_not_of(s._sv, pos)))
 
constexpr size_type find_first_not_of (value_type c) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find_first_not_of(c)))
 
constexpr size_type find_first_not_of (value_type c, size_type pos) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find_first_not_of(c, pos)))
 
constexpr size_type find_first_not_of (const value_type *s, size_type pos, size_type n) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find_first_not_of(s, pos, n)))
 
constexpr size_type find_first_not_of (const value_type *s) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find_first_not_of(s)))
 
constexpr size_type find_first_not_of (const value_type *s, size_type pos) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find_first_not_of(s, pos)))
 
constexpr size_type find_last_not_of (string_view_bridge s) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find_last_not_of(s._sv)))
 
constexpr size_type find_last_not_of (string_view_bridge s, size_type pos) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find_last_not_of(s._sv, pos)))
 
constexpr size_type find_last_not_of (value_type c) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find_last_not_of(c)))
 
constexpr size_type find_last_not_of (value_type c, size_type pos) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find_last_not_of(c, pos)))
 
constexpr size_type find_last_not_of (const value_type *s, size_type pos, size_type n) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find_last_not_of(s, pos, n)))
 
constexpr size_type find_last_not_of (const value_type *s) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find_last_not_of(s)))
 
constexpr size_type find_last_not_of (const value_type *s, size_type pos) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().find_last_not_of(s, pos)))
 
constexpr bool starts_with (string_view_bridge s) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().starts_with(s._sv)))
 
constexpr bool starts_with (value_type c) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().starts_with(c)))
 
constexpr bool starts_with (const value_type *s) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().starts_with(s)))
 
constexpr bool ends_with (string_view_bridge s) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().ends_with(s._sv)))
 
constexpr bool ends_with (value_type c) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().ends_with(c)))
 
constexpr bool ends_with (const value_type *s) const noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().ends_with(s)))
 

Additional Inherited Members

- Static Public Attributes inherited from jasl::inner::string_view_bridge< basic_string_view< CharT, Traits > >
static constexpr size_type npos
 
- Protected Member Functions inherited from jasl::inner::string_view_bridge< basic_string_view< CharT, Traits > >
constexpr string_view_bridge (basic_string_view< CharT, Traits > s) noexcept(std::is_nothrow_constructible< basic_string_view< CharT, Traits >, basic_string_view< CharT, Traits > >::value)
 
constexpr string_view_bridge (const string_view_bridge &s) noexcept(std::is_nothrow_copy_constructible< basic_string_view< CharT, Traits > >::value)=default
 
constexpr string_view_bridge (const value_type *str) noexcept(std::is_nothrow_constructible< basic_string_view< CharT, Traits >, const value_type * >::value)
 
constexpr string_view_bridge (const value_type *str, size_type len) noexcept(std::is_nothrow_constructible< basic_string_view< CharT, Traits >, const value_type *, size_type >::value)
 
string_view_bridgeoperator= (const string_view_bridge &) noexcept(std::is_nothrow_copy_assignable< basic_string_view< CharT, Traits > >::value)=default
 
JASL_CONSTEXPR_CXX14 void swap (string_view_bridge &s) noexcept(noexcept(std::declval< basic_string_view< CharT, Traits > >().swap(s._sv)))
 
JASL_CONSTEXPR_CXX14 void set (const value_type *str, size_type len) noexcept(is_nothrow_settable)
 
- Protected Attributes inherited from jasl::inner::string_view_bridge< basic_string_view< CharT, Traits > >
basic_string_view< CharT, Traits > _sv
 
- Static Protected Attributes inherited from jasl::inner::string_view_bridge< basic_string_view< CharT, Traits > >
static constexpr bool is_nothrow_settable
 

Detailed Description

template<typename CharT, typename Traits = std::char_traits<CharT>, typename AllocatorT = std::allocator<CharT>>
class jasl::basic_string< CharT, Traits, AllocatorT >

This class derives from [std::string_view] (or optionally from [jasl::string_view]). What is special about it is that if you assign (or construct with) character array to it, it won't allocate, copy and deallocate. In other cases it will allocate, copy and deallocate.

It has the functionality of its base class ([std::string_view]) only.


The documentation for this class was generated from the following file: