30 #ifndef _GLIBCXX_EXPERIMENTAL_FS_PATH_H 31 #define _GLIBCXX_EXPERIMENTAL_FS_PATH_H 1 33 #if __cplusplus < 201103L 47 #if __cplusplus == 201402L 51 #if defined(_WIN32) && !defined(__CYGWIN__) 52 # define _GLIBCXX_FILESYSTEM_IS_WINDOWS 1 56 namespace std _GLIBCXX_VISIBILITY(default)
58 _GLIBCXX_BEGIN_NAMESPACE_VERSION
60 namespace experimental
66 _GLIBCXX_BEGIN_NAMESPACE_CXX11
68 #if __cplusplus == 201402L 69 using std::experimental::basic_string_view;
70 #elif __cplusplus > 201402L 71 using std::basic_string_view;
82 template<
typename _CharT,
83 typename _Ch =
typename remove_const<_CharT>::type>
84 using __is_encoded_char
88 template<
typename _Iter,
89 typename _Iter_traits = std::iterator_traits<_Iter>>
90 using __is_path_iter_src
91 = __and_<__is_encoded_char<typename _Iter_traits::value_type>,
93 typename _Iter_traits::iterator_category>>;
95 template<
typename _Iter>
96 static __is_path_iter_src<_Iter>
97 __is_path_src(_Iter,
int);
99 template<
typename _CharT,
typename _Traits,
typename _Alloc>
100 static __is_encoded_char<_CharT>
103 #if __cplusplus >= 201402L 104 template<
typename _CharT,
typename _Traits>
105 static __is_encoded_char<_CharT>
106 __is_path_src(
const basic_string_view<_CharT, _Traits>&,
int);
109 template<
typename _Unknown>
111 __is_path_src(
const _Unknown&, ...);
113 template<
typename _Tp1,
typename _Tp2>
114 struct __constructible_from;
116 template<
typename _Iter>
117 struct __constructible_from<_Iter, _Iter>
118 : __is_path_iter_src<_Iter>
121 template<
typename _Source>
122 struct __constructible_from<_Source, void>
123 : decltype(__is_path_src(std::declval<_Source>(), 0))
126 template<
typename _Tp1,
typename _Tp2 =
void>
127 using _Path =
typename 130 __not_<is_void<_Tp1>>,
131 __constructible_from<_Tp1, _Tp2>>::value,
134 template<
typename _Source>
136 _S_range_begin(_Source __begin) {
return __begin; }
138 struct __null_terminated { };
140 template<
typename _Source>
141 static __null_terminated
142 _S_range_end(_Source) {
return {}; }
144 template<
typename _CharT,
typename _Traits,
typename _Alloc>
147 {
return __str.
data(); }
149 template<
typename _CharT,
typename _Traits,
typename _Alloc>
152 {
return __str.
data() + __str.
size(); }
154 #if __cplusplus >= 201402L 155 template<
typename _CharT,
typename _Traits>
157 _S_range_begin(
const basic_string_view<_CharT, _Traits>& __str)
158 {
return __str.data(); }
160 template<
typename _CharT,
typename _Traits>
162 _S_range_end(
const basic_string_view<_CharT, _Traits>& __str)
163 {
return __str.data() + __str.size(); }
166 template<
typename _Tp,
167 typename _Iter = decltype(_S_range_begin(std::declval<_Tp>())),
168 typename _Val =
typename std::iterator_traits<_Iter>::value_type>
174 #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS 175 typedef wchar_t value_type;
176 static constexpr value_type preferred_separator = L
'\\';
178 typedef char value_type;
179 static constexpr value_type preferred_separator =
'/';
187 path(
const path& __p) =
default;
189 path(path&& __p) noexcept
190 : _M_pathname(std::move(__p._M_pathname)), _M_type(__p._M_type)
196 path(string_type&& __source)
197 : _M_pathname(std::move(__source))
198 { _M_split_cmpts(); }
200 template<
typename _Source,
201 typename _Require = _Path<_Source>>
202 path(_Source
const& __source)
203 : _M_pathname(_S_convert(_S_range_begin(__source),
204 _S_range_end(__source)))
205 { _M_split_cmpts(); }
207 template<
typename _InputIterator,
208 typename _Require = _Path<_InputIterator, _InputIterator>>
209 path(_InputIterator __first, _InputIterator __last)
210 : _M_pathname(_S_convert(__first, __last))
211 { _M_split_cmpts(); }
213 template<
typename _Source,
214 typename _Require = _Path<_Source>,
215 typename _Require2 = __value_type_is_char<_Source>>
216 path(_Source
const& __source,
const locale& __loc)
217 : _M_pathname(_S_convert_loc(_S_range_begin(__source),
218 _S_range_end(__source), __loc))
219 { _M_split_cmpts(); }
221 template<
typename _InputIterator,
222 typename _Require = _Path<_InputIterator, _InputIterator>,
223 typename _Require2 = __value_type_is_char<_InputIterator>>
224 path(_InputIterator __first, _InputIterator __last,
const locale& __loc)
225 : _M_pathname(_S_convert_loc(__first, __last, __loc))
226 { _M_split_cmpts(); }
232 path& operator=(
const path& __p) =
default;
233 path& operator=(path&& __p) noexcept;
234 path& operator=(string_type&& __source);
235 path& assign(string_type&& __source);
237 template<
typename _Source>
239 operator=(_Source
const& __source)
240 {
return *
this = path(__source); }
242 template<
typename _Source>
244 assign(_Source
const& __source)
245 {
return *
this = path(__source); }
247 template<
typename _InputIterator>
248 _Path<_InputIterator, _InputIterator>&
249 assign(_InputIterator __first, _InputIterator __last)
250 {
return *
this = path(__first, __last); }
254 path& operator/=(
const path& __p) {
return _M_append(__p._M_pathname); }
256 template <
class _Source>
258 operator/=(_Source
const& __source)
259 {
return append(__source); }
261 template<
typename _Source>
263 append(_Source
const& __source)
265 return _M_append(_S_convert(_S_range_begin(__source),
266 _S_range_end(__source)));
269 template<
typename _InputIterator>
270 _Path<_InputIterator, _InputIterator>&
271 append(_InputIterator __first, _InputIterator __last)
272 {
return _M_append(_S_convert(__first, __last)); }
276 path& operator+=(
const path& __x);
277 path& operator+=(
const string_type& __x);
278 path& operator+=(
const value_type* __x);
279 path& operator+=(value_type __x);
280 #if __cplusplus >= 201402L 281 path& operator+=(basic_string_view<value_type> __x);
284 template<
typename _Source>
286 operator+=(_Source
const& __x) {
return concat(__x); }
288 template<
typename _CharT>
289 _Path<_CharT*, _CharT*>&
290 operator+=(_CharT __x);
292 template<
typename _Source>
294 concat(_Source
const& __x)
295 {
return *
this += _S_convert(_S_range_begin(__x), _S_range_end(__x)); }
297 template<
typename _InputIterator>
298 _Path<_InputIterator, _InputIterator>&
299 concat(_InputIterator __first, _InputIterator __last)
300 {
return *
this += _S_convert(__first, __last); }
304 void clear() noexcept { _M_pathname.clear(); _M_split_cmpts(); }
306 path& make_preferred();
307 path& remove_filename();
308 path& replace_filename(
const path& __replacement);
309 path& replace_extension(
const path& __replacement = path());
311 void swap(path& __rhs) noexcept;
315 const string_type& native()
const noexcept {
return _M_pathname; }
316 const value_type* c_str()
const noexcept {
return _M_pathname.c_str(); }
317 operator string_type()
const {
return _M_pathname; }
319 template<
typename _CharT,
typename _Traits = std::
char_traits<_CharT>,
320 typename _Allocator = std::allocator<_CharT>>
322 string(
const _Allocator& __a = _Allocator())
const;
325 #if _GLIBCXX_USE_WCHAR_T 333 template<
typename _CharT,
typename _Traits = std::
char_traits<_CharT>,
334 typename _Allocator = std::allocator<_CharT>>
336 generic_string(
const _Allocator& __a = _Allocator())
const;
339 #if _GLIBCXX_USE_WCHAR_T 348 int compare(
const path& __p)
const noexcept;
349 int compare(
const string_type& __s)
const;
350 int compare(
const value_type* __s)
const;
351 #if __cplusplus >= 201402L 352 int compare(
const basic_string_view<value_type> __s)
const;
357 path root_name()
const;
358 path root_directory()
const;
359 path root_path()
const;
360 path relative_path()
const;
361 path parent_path()
const;
362 path filename()
const;
364 path extension()
const;
368 bool empty()
const noexcept {
return _M_pathname.empty(); }
369 bool has_root_name()
const;
370 bool has_root_directory()
const;
371 bool has_root_path()
const;
372 bool has_relative_path()
const;
373 bool has_parent_path()
const;
374 bool has_filename()
const;
375 bool has_stem()
const;
376 bool has_extension()
const;
377 bool is_absolute()
const;
378 bool is_relative()
const {
return !is_absolute(); }
388 template<
typename _InputIterator,
389 typename _Traits = std::iterator_traits<_InputIterator>,
391 =
typename std::remove_cv<typename _Traits::value_type>::type>
393 _S_string_from_iter(_InputIterator __source)
396 for (_CharT __ch = *__source; __ch != _CharT(); __ch = *++__source)
402 enum class _Type : unsigned char {
403 _Multi, _Root_name, _Root_dir, _Filename
406 path(string_type __str, _Type __type) : _M_pathname(__str), _M_type(__type)
408 __glibcxx_assert(!empty());
409 __glibcxx_assert(_M_type != _Type::_Multi);
412 enum class _Split { _Stem, _Extension };
414 path& _M_append(
const string_type& __str)
416 if (!_M_pathname.empty() && !_S_is_dir_sep(_M_pathname.back())
417 && !__str.
empty() && !_S_is_dir_sep(__str.
front()))
418 _M_pathname += preferred_separator;
419 _M_pathname += __str;
426 template<
typename _CharT>
430 _S_convert(value_type* __src, __null_terminated)
431 {
return string_type(__src); }
434 _S_convert(
const value_type* __src, __null_terminated)
435 {
return string_type(__src); }
437 template<
typename _Iter>
439 _S_convert(_Iter __first, _Iter __last)
441 using __value_type =
typename std::iterator_traits<_Iter>::value_type;
442 return _Cvt<typename remove_cv<__value_type>::type>::
443 _S_convert(__first, __last);
446 template<
typename _InputIterator>
448 _S_convert(_InputIterator __src, __null_terminated)
450 auto __s = _S_string_from_iter(__src);
451 return _S_convert(__s.c_str(), __s.c_str() + __s.size());
455 _S_convert_loc(
const char* __first,
const char* __last,
458 template<
typename _Iter>
460 _S_convert_loc(_Iter __first, _Iter __last,
const std::locale& __loc)
463 return _S_convert_loc(__str.data(), __str.data()+__str.size(), __loc);
466 template<
typename _InputIterator>
468 _S_convert_loc(_InputIterator __src, __null_terminated,
472 return _S_convert_loc(__s.data(), __s.data() + __s.size(), __loc);
475 bool _S_is_dir_sep(value_type __ch)
477 #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS 478 return __ch == L
'/' || __ch == preferred_separator;
484 void _M_split_cmpts();
486 void _M_add_root_name(
size_t __n);
487 void _M_add_root_dir(
size_t __pos);
488 void _M_add_filename(
size_t __pos,
size_t __n);
490 string_type _M_pathname;
493 using _List = _GLIBCXX_STD_C::vector<_Cmpt>;
495 _Type _M_type = _Type::_Multi;
498 inline void swap(
path& __lhs,
path& __rhs) noexcept { __lhs.swap(__rhs); }
503 inline bool operator<(
const path& __lhs,
const path& __rhs) noexcept
504 {
return __lhs.compare(__rhs) < 0; }
507 inline bool operator<=(
const path& __lhs,
const path& __rhs) noexcept
508 {
return !(__rhs < __lhs); }
511 inline bool operator>(
const path& __lhs,
const path& __rhs) noexcept
512 {
return __rhs < __lhs; }
515 inline bool operator>=(
const path& __lhs,
const path& __rhs) noexcept
516 {
return !(__lhs < __rhs); }
519 inline bool operator==(
const path& __lhs,
const path& __rhs) noexcept
520 {
return __lhs.compare(__rhs) == 0; }
523 inline bool operator!=(
const path& __lhs,
const path& __rhs) noexcept
524 {
return !(__lhs == __rhs); }
529 path __result(__lhs);
535 template<
typename _CharT,
typename _Traits>
537 operator<<(basic_ostream<_CharT, _Traits>& __os,
const path& __p)
539 auto __tmp = __p.string<_CharT, _Traits>();
540 using __quoted_string
542 __os << __quoted_string{__tmp, _CharT(
'"'), _CharT(
'\\')};
547 template<
typename _CharT,
typename _Traits>
552 using __quoted_string
554 if (__is >> __quoted_string{ __tmp, _CharT(
'"'), _CharT(
'\\') })
555 __p = std::move(__tmp);
560 template<
typename _Source>
564 #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS 567 return path{ __source };
572 template<
typename _InputIterator>
574 u8path(_InputIterator __first, _InputIterator __last)
576 #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS 579 return path{ __first, __last };
586 filesystem_error(
const string& __what_arg,
error_code __ec)
589 filesystem_error(
const string& __what_arg,
const path& __p1,
593 filesystem_error(
const string& __what_arg,
const path& __p1,
595 :
system_error(__ec, __what_arg), _M_path1(__p1), _M_path2(__p2)
600 const path& path1()
const noexcept {
return _M_path1; }
601 const path& path2()
const noexcept {
return _M_path2; }
602 const char* what()
const noexcept {
return _M_what.c_str(); }
612 struct path::_Cmpt :
path 614 _Cmpt(string_type __s, _Type __t,
size_t __pos)
615 :
path(std::move(__s), __t), _M_pos(__pos) { }
617 _Cmpt() : _M_pos(-1) { }
624 struct path::_Cvt<path::value_type>
626 template<
typename _Iter>
628 _S_convert(_Iter __first, _Iter __last)
629 {
return string_type{__first, __last}; }
632 template<
typename _CharT>
635 #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS 637 _S_wconvert(
const char* __f,
const char* __l,
true_type)
640 const auto& __cvt = std::use_facet<_Cvt>(
std::locale{});
642 if (__str_codecvt_in(__f, __l, __wstr, __cvt))
644 _GLIBCXX_THROW_OR_ABORT(filesystem_error(
645 "Cannot convert character sequence",
646 std::make_error_code(errc::illegal_byte_sequence)));
650 _S_wconvert(
const _CharT* __f,
const _CharT* __l,
false_type)
652 std::codecvt_utf8<_CharT> __cvt;
654 if (__str_codecvt_out(__f, __l, __str, __cvt))
656 const char* __f2 = __str.
data();
657 const char* __l2 = __f2 + __str.size();
658 std::codecvt_utf8<wchar_t> __wcvt;
660 if (__str_codecvt_in(__f2, __l2, __wstr, __wcvt))
663 _GLIBCXX_THROW_OR_ABORT(filesystem_error(
664 "Cannot convert character sequence",
665 std::make_error_code(errc::illegal_byte_sequence)));
669 _S_convert(
const _CharT* __f,
const _CharT* __l)
675 _S_convert(
const _CharT* __f,
const _CharT* __l)
677 std::codecvt_utf8<_CharT> __cvt;
679 if (__str_codecvt_out(__f, __l, __str, __cvt))
681 _GLIBCXX_THROW_OR_ABORT(filesystem_error(
682 "Cannot convert character sequence",
683 std::make_error_code(errc::illegal_byte_sequence)));
688 _S_convert(_CharT* __f, _CharT* __l)
690 return _S_convert(const_cast<const _CharT*>(__f),
691 const_cast<const _CharT*>(__l));
694 template<
typename _Iter>
696 _S_convert(_Iter __first, _Iter __last)
699 return _S_convert(__str.
data(), __str.
data() + __str.
size());
702 template<
typename _Iter,
typename _Cont>
704 _S_convert(__gnu_cxx::__normal_iterator<_Iter, _Cont> __first,
705 __gnu_cxx::__normal_iterator<_Iter, _Cont> __last)
706 {
return _S_convert(__first.base(), __last.base()); }
713 using difference_type = std::ptrdiff_t;
719 iterator() : _M_path(
nullptr), _M_cur(), _M_at_end() { }
728 iterator operator++(
int) {
auto __tmp = *
this; ++*
this;
return __tmp; }
731 iterator operator--(
int) {
auto __tmp = *
this; --*
this;
return __tmp; }
734 {
return __lhs._M_equals(__rhs); }
737 {
return !__lhs._M_equals(__rhs); }
742 iterator(
const path* __path, path::_List::const_iterator __iter)
743 : _M_path(__path), _M_cur(__iter), _M_at_end()
746 iterator(
const path* __path,
bool __at_end)
747 : _M_path(__path), _M_cur(), _M_at_end(__at_end)
753 path::_List::const_iterator _M_cur;
759 path::operator=(path&& __p) noexcept
761 _M_pathname = std::move(__p._M_pathname);
762 _M_cmpts = std::move(__p._M_cmpts);
763 _M_type = __p._M_type;
770 {
return *
this = path(std::move(__source)); }
774 {
return *
this = path(std::move(__source)); }
777 path::operator+=(
const path& __p)
779 return operator+=(__p.native());
806 #if __cplusplus >= 201402L 808 path::operator+=(basic_string_view<value_type> __x)
810 _M_pathname.append(__x.data(), __x.size());
816 template<
typename _CharT>
817 inline path::_Path<_CharT*, _CharT*>&
818 path::operator+=(_CharT __x)
821 return concat(__addr, __addr + 1);
825 path::make_preferred()
827 #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS 828 std::replace(_M_pathname.begin(), _M_pathname.end(), L
'/',
829 preferred_separator);
834 inline void path::swap(path& __rhs) noexcept
836 _M_pathname.swap(__rhs._M_pathname);
837 _M_cmpts.swap(__rhs._M_cmpts);
838 std::swap(_M_type, __rhs._M_type);
841 template<
typename _CharT,
typename _Traits,
typename _Allocator>
846 return { _M_pathname.
begin(), _M_pathname.end(), __a };
848 const value_type* __first = _M_pathname.data();
849 const value_type* __last = __first + _M_pathname.size();
851 #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS 852 using _CharAlloc = __alloc_rebind<_Allocator, char>;
857 codecvt_utf8<value_type> __cvt;
858 _String __u8str{_CharAlloc{__a}};
859 if (__str_codecvt_out(__first, __last, __u8str, __cvt))
864 operator()(
const _String& __from, _String&,
true_type)
868 operator()(
const _String& __from, _WString& __to,
false_type)
871 codecvt_utf8<_CharT> __cvt;
872 const char* __f = __from.data();
873 const char* __l = __f + __from.size();
874 if (__str_codecvt_in(__f, __l, __to, __cvt))
884 codecvt_utf8<_CharT> __cvt;
886 if (__str_codecvt_in(__first, __last, __wstr, __cvt))
889 _GLIBCXX_THROW_OR_ABORT(filesystem_error(
890 "Cannot convert character sequence",
891 std::make_error_code(errc::illegal_byte_sequence)));
897 #if _GLIBCXX_USE_WCHAR_T 903 path::u8string()
const 905 #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS 908 codecvt_utf8<value_type> __cvt;
909 const value_type* __first = _M_pathname.data();
910 const value_type* __last = __first + _M_pathname.size();
911 if (__str_codecvt_out(__first, __last, __str, __cvt))
913 _GLIBCXX_THROW_OR_ABORT(filesystem_error(
914 "Cannot convert character sequence",
915 std::make_error_code(errc::illegal_byte_sequence)));
927 #ifndef _GLIBCXX_FILESYSTEM_IS_WINDOWS 928 template<
typename _CharT,
typename _Traits,
typename _Allocator>
930 path::generic_string(
const _Allocator& __a)
const 931 {
return string<_CharT, _Traits, _Allocator>(__a); }
934 path::generic_string()
const {
return string(); }
936 #if _GLIBCXX_USE_WCHAR_T 938 path::generic_wstring()
const {
return wstring(); }
942 path::generic_u8string()
const {
return u8string(); }
945 path::generic_u16string()
const {
return u16string(); }
948 path::generic_u32string()
const {
return u32string(); }
952 path::compare(
const string_type& __s)
const {
return compare(path(__s)); }
955 path::compare(
const value_type* __s)
const {
return compare(path(__s)); }
957 #if __cplusplus >= 201402L 959 path::compare(basic_string_view<value_type> __s)
const 960 {
return compare(path(__s)); }
964 path::filename()
const {
return empty() ? path() : *--
end(); }
969 auto ext = _M_find_extension();
970 if (ext.first && ext.second != 0)
971 return path{ext.first->substr(0, ext.second)};
976 path::extension()
const 978 auto ext = _M_find_extension();
980 return path{ext.first->substr(ext.second)};
985 path::has_stem()
const 987 auto ext = _M_find_extension();
988 return ext.first && ext.second != 0;
992 path::has_extension()
const 994 auto ext = _M_find_extension();
999 path::is_absolute()
const 1001 #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS 1002 return has_root_name() && has_root_directory();
1004 return has_root_directory();
1011 if (_M_type == _Type::_Multi)
1012 return iterator(
this, _M_cmpts.begin());
1019 if (_M_type == _Type::_Multi)
1020 return iterator(
this, _M_cmpts.end());
1025 path::iterator::operator++()
1027 __glibcxx_assert(_M_path !=
nullptr);
1028 if (_M_path->_M_type == _Type::_Multi)
1030 __glibcxx_assert(_M_cur != _M_path->_M_cmpts.end());
1035 __glibcxx_assert(!_M_at_end);
1042 path::iterator::operator--()
1044 __glibcxx_assert(_M_path !=
nullptr);
1045 if (_M_path->_M_type == _Type::_Multi)
1047 __glibcxx_assert(_M_cur != _M_path->_M_cmpts.begin());
1052 __glibcxx_assert(_M_at_end);
1059 path::iterator::operator*()
const 1061 __glibcxx_assert(_M_path !=
nullptr);
1062 if (_M_path->_M_type == _Type::_Multi)
1064 __glibcxx_assert(_M_cur != _M_path->_M_cmpts.end());
1071 path::iterator::_M_equals(
iterator __rhs)
const 1073 if (_M_path != __rhs._M_path)
1075 if (_M_path ==
nullptr)
1077 if (_M_path->_M_type == path::_Type::_Multi)
1078 return _M_cur == __rhs._M_cur;
1079 return _M_at_end == __rhs._M_at_end;
1083 _GLIBCXX_END_NAMESPACE_CXX11
1088 _GLIBCXX_END_NAMESPACE_VERSION
1093 #endif // _GLIBCXX_EXPERIMENTAL_FS_PATH_H Template class basic_istream.
Thrown to indicate error code of underlying system.
Define a member typedef type only if a boolean constant is true.
_GLIBCXX20_CONSTEXPR complex< _Tp > operator/(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x divided by y.
constexpr const _Tp * end(initializer_list< _Tp > __ils) noexcept
Return an iterator pointing to one past the last element of the initializer_list. ...
Class codecvt<wchar_t, char, mbstate_t> specialization.
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
bool empty() const noexcept
constexpr const _Tp * begin(initializer_list< _Tp > __ils) noexcept
Return an iterator pointing to the first element of the initializer_list.
ISO C++ entities toplevel namespace is std.
basic_string< char16_t > u16string
A string of char16_t.
Struct holding two objects of arbitrary type.
Bidirectional iterators support a superset of forward iterator operations.
basic_string< wchar_t > wstring
A string of wchar_t.
An iterator for the components of a path.
_GLIBCXX_END_NAMESPACE_CXX11 typedef basic_string< char > string
A string of char.
Managing sequences of characters and character-like objects.
static const size_type npos
Value returned by various member functions when they fail.
Template class basic_ostream.
_GLIBCXX20_CONSTEXPR complex< _Tp > operator*(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x times y.
size_t hash_value(const path &__p) noexcept
Compare paths.
std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, bitset< _Nb > &__x)
Global I/O operators for bitsets.
basic_string< char32_t > u32string
A string of char32_t.
path u8path(const _Source &__source)
Compare paths.
Container class for localization functionality.The locale class is first a class wrapper for C librar...
const _CharT * data() const noexcept
Return const pointer to contents.
Struct for delimited strings.
size_type size() const noexcept
Returns the number of characters in the string, not including any null-termination.
void replace(_ForwardIterator __first, _ForwardIterator __last, const _Tp &__old_value, const _Tp &__new_value)
Replace each occurrence of one value in a sequence with another value.
void push_back(_CharT __c)
Append a single character.