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 namespace experimental
64 _GLIBCXX_BEGIN_NAMESPACE_VERSION
65 _GLIBCXX_BEGIN_NAMESPACE_CXX11
67 #if __cplusplus == 201402L 68 using std::experimental::basic_string_view;
69 #elif __cplusplus > 201402L 70 using std::basic_string_view;
81 template<
typename _CharT>
84 template<
typename _Iter,
85 typename _Iter_traits = std::iterator_traits<_Iter>>
86 using __is_path_iter_src
87 = __and_<__is_encoded_char<typename _Iter_traits::value_type>,
89 typename _Iter_traits::iterator_category>>;
91 template<
typename _Iter>
92 static __is_path_iter_src<_Iter>
93 __is_path_src(_Iter,
int);
95 template<
typename _CharT,
typename _Traits,
typename _Alloc>
96 static __is_encoded_char<_CharT>
99 #if __cplusplus >= 201402L 100 template<
typename _CharT,
typename _Traits>
101 static __is_encoded_char<_CharT>
102 __is_path_src(
const basic_string_view<_CharT, _Traits>&,
int);
105 template<
typename _Unknown>
107 __is_path_src(
const _Unknown&, ...);
109 template<
typename _Tp1,
typename _Tp2>
110 struct __constructible_from;
112 template<
typename _Iter>
113 struct __constructible_from<_Iter, _Iter>
114 : __is_path_iter_src<_Iter>
117 template<
typename _Source>
118 struct __constructible_from<_Source, void>
119 : decltype(__is_path_src(std::declval<_Source>(), 0))
122 template<
typename _Tp1,
typename _Tp2 =
void>
123 using _Path =
typename 124 std::enable_if<__and_<__not_<is_same<_Tp1, path>>,
125 __constructible_from<_Tp1, _Tp2>>::value,
128 template<
typename _Source>
130 _S_range_begin(_Source __begin) {
return __begin; }
132 struct __null_terminated { };
134 template<
typename _Source>
135 static __null_terminated
136 _S_range_end(_Source) {
return {}; }
138 template<
typename _CharT,
typename _Traits,
typename _Alloc>
141 {
return __str.
data(); }
143 template<
typename _CharT,
typename _Traits,
typename _Alloc>
146 {
return __str.
data() + __str.
size(); }
148 #if __cplusplus >= 201402L 149 template<
typename _CharT,
typename _Traits>
151 _S_range_begin(
const basic_string_view<_CharT, _Traits>& __str)
152 {
return __str.data(); }
154 template<
typename _CharT,
typename _Traits>
156 _S_range_end(
const basic_string_view<_CharT, _Traits>& __str)
157 {
return __str.data() + __str.size(); }
160 template<
typename _Tp,
161 typename _Iter = decltype(_S_range_begin(std::declval<_Tp>())),
162 typename _Val =
typename std::iterator_traits<_Iter>::value_type>
163 using __value_type_is_char
164 =
typename std::enable_if<std::is_same<_Val, char>::value>::type;
167 #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS 168 typedef wchar_t value_type;
169 static constexpr value_type preferred_separator = L
'\\';
171 typedef char value_type;
172 static constexpr value_type preferred_separator =
'/';
183 : _M_pathname(std::move(__p._M_pathname)), _M_type(__p._M_type)
189 path(string_type&& __source)
190 : _M_pathname(std::move(__source))
191 { _M_split_cmpts(); }
193 template<
typename _Source,
194 typename _Require = _Path<_Source>>
195 path(_Source
const& __source)
196 : _M_pathname(_S_convert(_S_range_begin(__source),
197 _S_range_end(__source)))
198 { _M_split_cmpts(); }
200 template<
typename _InputIterator,
201 typename _Require = _Path<_InputIterator, _InputIterator>>
202 path(_InputIterator __first, _InputIterator __last)
203 : _M_pathname(_S_convert(__first, __last))
204 { _M_split_cmpts(); }
206 template<
typename _Source,
207 typename _Require = _Path<_Source>,
208 typename _Require2 = __value_type_is_char<_Source>>
209 path(_Source
const& __source,
const locale& __loc)
210 : _M_pathname(_S_convert_loc(_S_range_begin(__source),
211 _S_range_end(__source), __loc))
212 { _M_split_cmpts(); }
214 template<
typename _InputIterator,
215 typename _Require = _Path<_InputIterator, _InputIterator>,
216 typename _Require2 = __value_type_is_char<_InputIterator>>
217 path(_InputIterator __first, _InputIterator __last,
const locale& __loc)
218 : _M_pathname(_S_convert_loc(__first, __last, __loc))
219 { _M_split_cmpts(); }
225 path& operator=(
const path& __p) =
default;
226 path& operator=(path&& __p) noexcept;
227 path& operator=(string_type&& __source);
228 path& assign(string_type&& __source);
230 template<
typename _Source>
232 operator=(_Source
const& __source)
233 {
return *
this = path(__source); }
235 template<
typename _Source>
237 assign(_Source
const& __source)
238 {
return *
this = path(__source); }
240 template<
typename _InputIterator>
241 _Path<_InputIterator, _InputIterator>&
242 assign(_InputIterator __first, _InputIterator __last)
243 {
return *
this = path(__first, __last); }
247 path& operator/=(
const path& __p) {
return _M_append(__p._M_pathname); }
249 template <
class _Source>
251 operator/=(_Source
const& __source)
252 {
return append(__source); }
254 template<
typename _Source>
256 append(_Source
const& __source)
258 return _M_append(_S_convert(_S_range_begin(__source),
259 _S_range_end(__source)));
262 template<
typename _InputIterator>
263 _Path<_InputIterator, _InputIterator>&
264 append(_InputIterator __first, _InputIterator __last)
265 {
return _M_append(_S_convert(__first, __last)); }
269 path& operator+=(
const path& __x);
270 path& operator+=(
const string_type& __x);
271 path& operator+=(
const value_type* __x);
272 path& operator+=(value_type __x);
273 #if __cplusplus >= 201402L 274 path& operator+=(basic_string_view<value_type> __x);
277 template<
typename _Source>
279 operator+=(_Source
const& __x) {
return concat(__x); }
281 template<
typename _CharT>
282 _Path<_CharT*, _CharT*>&
283 operator+=(_CharT __x);
285 template<
typename _Source>
287 concat(_Source
const& __x)
288 {
return *
this += _S_convert(_S_range_begin(__x), _S_range_end(__x)); }
290 template<
typename _InputIterator>
291 _Path<_InputIterator, _InputIterator>&
292 concat(_InputIterator __first, _InputIterator __last)
293 {
return *
this += _S_convert(__first, __last); }
297 void clear() noexcept { _M_pathname.clear(); _M_split_cmpts(); }
299 path& make_preferred();
300 path& remove_filename();
301 path& replace_filename(
const path& __replacement);
302 path& replace_extension(
const path& __replacement = path());
304 void swap(path& __rhs) noexcept;
308 const string_type& native()
const noexcept {
return _M_pathname; }
309 const value_type* c_str()
const noexcept {
return _M_pathname.c_str(); }
310 operator string_type()
const {
return _M_pathname; }
312 template<
typename _CharT,
typename _Traits = std::
char_traits<_CharT>,
313 typename _Allocator = std::allocator<_CharT>>
315 string(
const _Allocator& __a = _Allocator())
const;
318 #if _GLIBCXX_USE_WCHAR_T 326 template<
typename _CharT,
typename _Traits = std::
char_traits<_CharT>,
327 typename _Allocator = std::allocator<_CharT>>
329 generic_string(
const _Allocator& __a = _Allocator())
const;
332 #if _GLIBCXX_USE_WCHAR_T 341 int compare(
const path& __p)
const noexcept;
342 int compare(
const string_type& __s)
const;
343 int compare(
const value_type* __s)
const;
344 #if __cplusplus >= 201402L 345 int compare(
const basic_string_view<value_type> __s)
const;
350 path root_name()
const;
351 path root_directory()
const;
352 path root_path()
const;
353 path relative_path()
const;
354 path parent_path()
const;
355 path filename()
const;
357 path extension()
const;
361 bool empty()
const noexcept {
return _M_pathname.empty(); }
362 bool has_root_name()
const;
363 bool has_root_directory()
const;
364 bool has_root_path()
const;
365 bool has_relative_path()
const;
366 bool has_parent_path()
const;
367 bool has_filename()
const;
368 bool has_stem()
const;
369 bool has_extension()
const;
370 bool is_absolute()
const;
371 bool is_relative()
const {
return !is_absolute(); }
381 enum class _Type : unsigned char {
382 _Multi, _Root_name, _Root_dir, _Filename
385 path(string_type __str, _Type __type) : _M_pathname(__str), _M_type(__type)
387 __glibcxx_assert(!empty());
388 __glibcxx_assert(_M_type != _Type::_Multi);
391 enum class _Split { _Stem, _Extension };
393 path& _M_append(
const string_type& __str)
395 if (!_M_pathname.empty() && !_S_is_dir_sep(_M_pathname.back())
396 && !__str.
empty() && !_S_is_dir_sep(__str.
front()))
397 _M_pathname += preferred_separator;
398 _M_pathname += __str;
405 template<
typename _CharT>
409 _S_convert(value_type* __src, __null_terminated)
410 {
return string_type(__src); }
413 _S_convert(
const value_type* __src, __null_terminated)
414 {
return string_type(__src); }
416 template<
typename _Iter>
418 _S_convert(_Iter __first, _Iter __last)
420 using __value_type =
typename std::iterator_traits<_Iter>::value_type;
421 return _Cvt<typename remove_cv<__value_type>::type>::
422 _S_convert(__first, __last);
425 template<
typename _InputIterator>
427 _S_convert(_InputIterator __src, __null_terminated)
429 using _Tp =
typename std::iterator_traits<_InputIterator>::value_type;
431 for (; *__src != _Tp{}; ++__src)
437 _S_convert_loc(
const char* __first,
const char* __last,
440 template<
typename _Iter>
442 _S_convert_loc(_Iter __first, _Iter __last,
const std::locale& __loc)
445 return _S_convert_loc(__str.
data(), __str.
data()+__str.
size(), __loc);
448 template<
typename _InputIterator>
450 _S_convert_loc(_InputIterator __src, __null_terminated,
454 while (*__src !=
'\0')
456 return _S_convert_loc(__tmp.
data(), __tmp.
data()+__tmp.
size(), __loc);
459 bool _S_is_dir_sep(value_type __ch)
461 #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS 462 return __ch == L
'/' || __ch == preferred_separator;
468 void _M_split_cmpts();
470 void _M_add_root_name(
size_t __n);
471 void _M_add_root_dir(
size_t __pos);
472 void _M_add_filename(
size_t __pos,
size_t __n);
474 string_type _M_pathname;
477 using _List = _GLIBCXX_STD_C::vector<_Cmpt>;
479 _Type _M_type = _Type::_Multi;
482 inline void swap(
path& __lhs,
path& __rhs) noexcept { __lhs.swap(__rhs); }
487 inline bool operator<(
const path& __lhs,
const path& __rhs) noexcept
488 {
return __lhs.compare(__rhs) < 0; }
491 inline bool operator<=(
const path& __lhs,
const path& __rhs) noexcept
492 {
return !(__rhs < __lhs); }
495 inline bool operator>(
const path& __lhs,
const path& __rhs) noexcept
496 {
return __rhs < __lhs; }
499 inline bool operator>=(
const path& __lhs,
const path& __rhs) noexcept
500 {
return !(__lhs < __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 !(__lhs == __rhs); }
512 {
return path(__lhs) /= __rhs; }
515 template<
typename _CharT,
typename _Traits>
517 operator<<(basic_ostream<_CharT, _Traits>& __os,
const path& __p)
519 auto __tmp = __p.string<_CharT, _Traits>();
520 using __quoted_string
522 __os << __quoted_string{__tmp,
'"',
'\\'};
527 template<
typename _CharT,
typename _Traits>
532 using __quoted_string
534 if (__is >> __quoted_string{ __tmp,
'"',
'\\' })
535 __p = std::move(__tmp);
540 template<
typename _Source>
544 #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS 547 return path{ __source };
552 template<
typename _InputIterator>
554 u8path(_InputIterator __first, _InputIterator __last)
556 #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS 559 return path{ __first, __last };
566 filesystem_error(
const string& __what_arg,
error_code __ec)
569 filesystem_error(
const string& __what_arg,
const path& __p1,
573 filesystem_error(
const string& __what_arg,
const path& __p1,
575 :
system_error(__ec, __what_arg), _M_path1(__p1), _M_path2(__p2)
580 const path& path1()
const noexcept {
return _M_path1; }
581 const path& path2()
const noexcept {
return _M_path2; }
582 const char* what()
const noexcept {
return _M_what.c_str(); }
594 {
using value_type = char; };
598 {
using value_type = wchar_t; };
602 {
using value_type = char16_t; };
606 {
using value_type = char32_t; };
608 template<
typename _Tp>
609 struct path::__is_encoded_char<const _Tp> : __is_encoded_char<_Tp> { };
611 struct path::_Cmpt :
path 613 _Cmpt(string_type __s, _Type __t,
size_t __pos)
614 :
path(std::move(__s), __t), _M_pos(__pos) { }
616 _Cmpt() : _M_pos(-1) { }
623 struct path::_Cvt<path::value_type>
625 template<
typename _Iter>
627 _S_convert(_Iter __first, _Iter __last)
628 {
return string_type{__first, __last}; }
631 template<
typename _CharT>
634 #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS 636 _S_wconvert(
const char* __f,
const char* __l,
true_type)
639 const auto& __cvt = std::use_facet<_Cvt>(
std::locale{});
641 if (__str_codecvt_in(__f, __l, __wstr, __cvt))
643 _GLIBCXX_THROW_OR_ABORT(filesystem_error(
644 "Cannot convert character sequence",
645 std::make_error_code(errc::illegal_byte_sequence)));
649 _S_wconvert(
const _CharT* __f,
const _CharT* __l,
false_type)
651 std::codecvt_utf8<_CharT> __cvt;
653 if (__str_codecvt_out(__f, __l, __str, __cvt))
655 const char* __f2 = __str.
data();
656 const char* __l2 = __f2 + __str.
size();
657 std::codecvt_utf8<wchar_t> __wcvt;
659 if (__str_codecvt_in(__f2, __l2, __wstr, __wcvt))
662 _GLIBCXX_THROW_OR_ABORT(filesystem_error(
663 "Cannot convert character sequence",
664 std::make_error_code(errc::illegal_byte_sequence)));
668 _S_convert(
const _CharT* __f,
const _CharT* __l)
670 return _S_wconvert(__f, __l, is_same<_CharT, char>{});
674 _S_convert(
const _CharT* __f,
const _CharT* __l)
676 std::codecvt_utf8<_CharT> __cvt;
678 if (__str_codecvt_out(__f, __l, __str, __cvt))
680 _GLIBCXX_THROW_OR_ABORT(filesystem_error(
681 "Cannot convert character sequence",
682 std::make_error_code(errc::illegal_byte_sequence)));
687 _S_convert(_CharT* __f, _CharT* __l)
689 return _S_convert(const_cast<const _CharT*>(__f),
690 const_cast<const _CharT*>(__l));
693 template<
typename _Iter>
695 _S_convert(_Iter __first, _Iter __last)
698 return _S_convert(__str.
data(), __str.
data() + __str.
size());
701 template<
typename _Iter,
typename _Cont>
703 _S_convert(__gnu_cxx::__normal_iterator<_Iter, _Cont> __first,
704 __gnu_cxx::__normal_iterator<_Iter, _Cont> __last)
705 {
return _S_convert(__first.base(), __last.base()); }
712 using difference_type = std::ptrdiff_t;
718 iterator() : _M_path(
nullptr), _M_cur(), _M_at_end() { }
727 iterator operator++(
int) {
auto __tmp = *
this; ++_M_cur;
return __tmp; }
730 iterator operator--(
int) {
auto __tmp = *
this; --_M_cur;
return __tmp; }
733 {
return __lhs._M_equals(__rhs); }
736 {
return !__lhs._M_equals(__rhs); }
741 iterator(
const path* __path, path::_List::const_iterator __iter)
742 : _M_path(__path), _M_cur(__iter), _M_at_end()
745 iterator(
const path* __path,
bool __at_end)
746 : _M_path(__path), _M_cur(), _M_at_end(__at_end)
752 path::_List::const_iterator _M_cur;
758 path::operator=(path&& __p) noexcept
760 _M_pathname = std::move(__p._M_pathname);
761 _M_cmpts = std::move(__p._M_cmpts);
762 _M_type = __p._M_type;
769 {
return *
this = path(std::move(__source)); }
773 {
return *
this = path(std::move(__source)); }
776 path::operator+=(
const path& __p)
778 return operator+=(__p.native());
805 #if __cplusplus >= 201402L 807 path::operator+=(basic_string_view<value_type> __x)
809 _M_pathname.append(__x.data(), __x.size());
815 template<
typename _CharT>
816 inline path::_Path<_CharT*, _CharT*>&
817 path::operator+=(_CharT __x)
820 return concat(__addr, __addr + 1);
824 path::make_preferred()
826 #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS 827 std::replace(_M_pathname.begin(), _M_pathname.end(), L
'/',
828 preferred_separator);
833 inline void path::swap(path& __rhs) noexcept
835 _M_pathname.swap(__rhs._M_pathname);
836 _M_cmpts.swap(__rhs._M_cmpts);
837 std::swap(_M_type, __rhs._M_type);
840 template<
typename _CharT,
typename _Traits,
typename _Allocator>
844 if (is_same<_CharT, value_type>::value)
845 return { _M_pathname.
begin(), _M_pathname.end(), __a };
847 const value_type* __first = _M_pathname.data();
848 const value_type* __last = __first + _M_pathname.size();
850 #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS 851 using _CharAlloc = __alloc_rebind<_Allocator, char>;
856 codecvt_utf8<value_type> __cvt;
857 _String __u8str{_CharAlloc{__a}};
858 if (__str_codecvt_out(__first, __last, __u8str, __cvt))
863 operator()(
const _String& __from, _String&,
true_type)
867 operator()(
const _String& __from, _WString& __to,
false_type)
870 codecvt_utf8<_CharT> __cvt;
871 const char* __f = __from.data();
872 const char* __l = __f + __from.size();
873 if (__str_codecvt_in(__f, __l, __to, __cvt))
879 if (
auto* __p = __dispatch(__u8str, __wstr, is_same<_CharT, char>{}))
883 codecvt_utf8<_CharT> __cvt;
885 if (__str_codecvt_in(__first, __last, __wstr, __cvt))
888 _GLIBCXX_THROW_OR_ABORT(filesystem_error(
889 "Cannot convert character sequence",
890 std::make_error_code(errc::illegal_byte_sequence)));
896 #if _GLIBCXX_USE_WCHAR_T 902 path::u8string()
const 904 #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS 907 codecvt_utf8<value_type> __cvt;
908 const value_type* __first = _M_pathname.data();
909 const value_type* __last = __first + _M_pathname.size();
910 if (__str_codecvt_out(__first, __last, __str, __cvt))
912 _GLIBCXX_THROW_OR_ABORT(filesystem_error(
913 "Cannot convert character sequence",
914 std::make_error_code(errc::illegal_byte_sequence)));
926 #ifndef _GLIBCXX_FILESYSTEM_IS_WINDOWS 927 template<
typename _CharT,
typename _Traits,
typename _Allocator>
929 path::generic_string(
const _Allocator& __a)
const 933 path::generic_string()
const {
return string(); }
935 #if _GLIBCXX_USE_WCHAR_T 937 path::generic_wstring()
const {
return wstring(); }
941 path::generic_u8string()
const {
return u8string(); }
944 path::generic_u16string()
const {
return u16string(); }
947 path::generic_u32string()
const {
return u32string(); }
951 path::compare(
const string_type& __s)
const {
return compare(path(__s)); }
954 path::compare(
const value_type* __s)
const {
return compare(path(__s)); }
956 #if __cplusplus >= 201402L 958 path::compare(basic_string_view<value_type> __s)
const 959 {
return compare(path(__s)); }
963 path::filename()
const {
return empty() ? path() : *--
end(); }
968 auto ext = _M_find_extension();
969 if (ext.first && ext.second != 0)
970 return path{ext.first->substr(0, ext.second)};
975 path::extension()
const 977 auto ext = _M_find_extension();
979 return path{ext.first->substr(ext.second)};
984 path::has_stem()
const 986 auto ext = _M_find_extension();
987 return ext.first && ext.second != 0;
991 path::has_extension()
const 993 auto ext = _M_find_extension();
998 path::is_absolute()
const 1000 #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS 1001 return has_root_name();
1003 return has_root_directory();
1010 if (_M_type == _Type::_Multi)
1011 return iterator(
this, _M_cmpts.begin());
1018 if (_M_type == _Type::_Multi)
1019 return iterator(
this, _M_cmpts.end());
1024 path::iterator::operator++()
1026 __glibcxx_assert(_M_path !=
nullptr);
1027 if (_M_path->_M_type == _Type::_Multi)
1029 __glibcxx_assert(_M_cur != _M_path->_M_cmpts.end());
1034 __glibcxx_assert(!_M_at_end);
1041 path::iterator::operator--()
1043 __glibcxx_assert(_M_path !=
nullptr);
1044 if (_M_path->_M_type == _Type::_Multi)
1046 __glibcxx_assert(_M_cur != _M_path->_M_cmpts.begin());
1051 __glibcxx_assert(_M_at_end);
1058 path::iterator::operator*()
const 1060 __glibcxx_assert(_M_path !=
nullptr);
1061 if (_M_path->_M_type == _Type::_Multi)
1063 __glibcxx_assert(_M_cur != _M_path->_M_cmpts.end());
1070 path::iterator::_M_equals(
iterator __rhs)
const 1072 if (_M_path != __rhs._M_path)
1074 if (_M_path ==
nullptr)
1076 if (_M_path->_M_type == path::_Type::_Multi)
1077 return _M_cur == __rhs._M_cur;
1078 return _M_at_end == __rhs._M_at_end;
1082 _GLIBCXX_END_NAMESPACE_CXX11
1083 _GLIBCXX_END_NAMESPACE_VERSION
1091 #endif // _GLIBCXX_EXPERIMENTAL_FS_PATH_H
path u8path(const _Source &__source)
Compare paths.
static const size_type npos
Value returned by various member functions when they fail.
complex< _Tp > operator*(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x times y.
const _CharT * data() const noexcept
Return const pointer to contents.
Managing sequences of characters and character-like objects.
constexpr const _Tp * begin(initializer_list< _Tp > __ils) noexcept
Return an iterator pointing to the first element of the initializer_list.
Template class basic_ostream.
complex< _Tp > operator/(const complex< _Tp > &__x, const complex< _Tp > &__y)
Return new complex value x divided by y.
size_t hash_value(const path &__p) noexcept
Compare paths.
size_type size() const noexcept
Returns the number of characters in the string, not including any null-termination.
Thrown to indicate error code of underlying system.
bool empty() const noexcept
const _CharT * c_str() const noexcept
Return const pointer to null-terminated contents.
constexpr const _Tp * end(initializer_list< _Tp > __ils) noexcept
Return an iterator pointing to one past the last element of the initializer_list. ...
void push_back(_CharT __c)
Append a single character.
Struct for delimited strings.
ISO C++ entities toplevel namespace is std.
Template class basic_istream.
basic_string< wchar_t > wstring
A string of wchar_t.
basic_string< char > string
A string of char.
basic_string< char16_t > u16string
A string of char16_t.
constexpr _Tp * __addressof(_Tp &__r) noexcept
Same as C++11 std::addressof.
std::basic_istream< _CharT, _Traits > & operator>>(std::basic_istream< _CharT, _Traits > &__is, bitset< _Nb > &__x)
Global I/O operators for bitsets.
Struct holding two objects of arbitrary type.
An iterator for the components of a path.
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.
Container class for localization functionality.The locale class is first a class wrapper for C librar...
Class codecvt<wchar_t, char, mbstate_t> specialization.
basic_string< char32_t > u32string
A string of char32_t.
Bidirectional iterators support a superset of forward iterator operations.