Pigweed
C/C++ API Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
Public Member Functions | List of all members
pw::InlineBasicString< T, kCapacity > Class Template Referencefinal

pw::InlineBasicString is a fixed-capacity version of std::basic_string. In brief: More...

Public Member Functions

constexpr InlineBasicString (size_t count, T ch)
 
template<size_t kOtherCapacity>
constexpr InlineBasicString (const InlineBasicString< T, kOtherCapacity > &other, size_t index, size_t count=npos)
 
constexpr InlineBasicString (const T *string, size_t count)
 
template<typename U , typename = string_impl::EnableIfNonArrayCharPointer<T, U>>
constexpr InlineBasicString (U c_string)
 
template<size_t kCharArraySize>
constexpr InlineBasicString (const T(&array)[kCharArraySize])
 
template<typename Iterator , typename = containers::internal::EnableIfInputIterator<Iterator>>
constexpr InlineBasicString (Iterator start, Iterator finish)
 
constexpr InlineBasicString (const InlineBasicString &)=default
 
template<size_t kOtherCapacity>
constexpr InlineBasicString (const InlineBasicString< T, kOtherCapacity > &other)
 
constexpr InlineBasicString (std::initializer_list< T > list)
 
template<typename StringViewLike , string_impl::EnableIfStringViewLikeButNotStringView< T, StringViewLike > * = nullptr>
constexpr InlineBasicString (const StringViewLike &string)
 
template<typename StringView , std::enable_if_t< std::is_same< StringView, string_impl::View< T > >::value > * = nullptr>
constexpr InlineBasicString (const StringView &view)
 
template<typename StringView , typename = string_impl::EnableIfStringViewLike<T, StringView>>
constexpr InlineBasicString (const StringView &string, size_t index, size_t count)
 
 InlineBasicString (std::nullptr_t)=delete
 
constexpr InlineBasicStringoperator= (const InlineBasicString &other)=default
 
template<size_t kOtherCapacity>
constexpr InlineBasicStringoperator= (const InlineBasicString< T, kOtherCapacity > &other)
 
template<size_t kCharArraySize>
constexpr InlineBasicStringoperator= (const T(&array)[kCharArraySize])
 
template<typename U , typename = string_impl::EnableIfNonArrayCharPointer<T, U>>
constexpr InlineBasicStringoperator= (U c_string)
 
constexpr InlineBasicStringoperator= (T ch)
 
constexpr InlineBasicStringoperator= (std::initializer_list< T > list)
 
template<typename StringView , typename = string_impl::EnableIfStringViewLike<T, StringView>>
constexpr InlineBasicStringoperator= (const StringView &string)
 
constexpr InlineBasicStringoperator= (std::nullptr_t)=delete
 
template<size_t kOtherCapacity>
constexpr InlineBasicStringoperator+= (const InlineBasicString< T, kOtherCapacity > &string)
 
constexpr InlineBasicStringoperator+= (T character)
 
template<size_t kCharArraySize>
constexpr InlineBasicStringoperator+= (const T(&array)[kCharArraySize])
 
template<typename U , typename = string_impl::EnableIfNonArrayCharPointer<T, U>>
constexpr InlineBasicStringoperator+= (U c_string)
 
constexpr InlineBasicStringoperator+= (std::initializer_list< T > list)
 
template<typename StringView , typename = string_impl::EnableIfStringViewLike<T, StringView>>
constexpr InlineBasicStringoperator+= (const StringView &string)
 
constexpr pointer data ()
 
constexpr const_pointer data () const
 
constexpr size_t max_size () const noexcept
 

Detailed Description

template<typename T, size_t kCapacity = string_impl::kGeneric>
class pw::InlineBasicString< T, kCapacity >

pw::InlineBasicString is a fixed-capacity version of std::basic_string. In brief:

pw::InlineBasicString is efficient and compact. The current size and capacity are stored in a single word. Accessing its contents is a simple array access within the object, with no pointer indirection, even when working from a generic reference pw::InlineBasicString<T> where the capacity is not specified as a template argument. A string object can be used safely without the need to know its capacity.

See also pw::InlineString, which is an alias of pw::InlineBasicString<char> and is equivalent to std::string.


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