LegacyRandomAccessIterator, contiguous_iterator, and ConstexprIterator to const value_type LegacyRandomAccessIterator and Legac圜ontiguousIterator to const value_type LegacyRandomAccessIterator, contiguous_iterator, and ConstexprIterator to value_type LegacyRandomAccessIterator and Legac圜ontiguousIterator to value_type Std:: allocator_traits :: difference_type Traits class specifying the operations on the character typeĪllocator type used to allocate internal storage Several typedefs for common character types are provided: However, std::string objects generally cannot be constexpr, because any dynamically allocated storage must be released in the same evaluation of constant expression. Member functions of std::basic_string are constexpr: it is possible to create and use std::string objects in the evaluation of a constant expression. If any of Traits::char_type and Allocator::char_type is different from CharT, the program is ill-formed. Std::basic_string satisfies the requirements of AllocatorAwareContainer (except that customized construct/ destroy are not used for construction/destruction of elements), SequenceContainer and ContiguousContainer (since C++17). begin ( ) + n for any n in can be passed to functions that expect a pointer to the first element of an array (until C++11) a null-terminated array (since C++11) of CharT. The elements of a basic_string are stored contiguously, that is, for a basic_string s, & * (s. The definitions of the operations are supplied via the Traits template parameter - a specialization of std::char_traits or a compatible traits class. The class is dependent neither on the character type nor on the nature of operations on that type. The class template basic_string stores and manipulates sequences of character-like objects, which are non-array objects of TrivialType and StandardLayoutType.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |