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
85 = __or_<is_same<_Ch, char>,
87 #ifdef _GLIBCXX_USE_CHAR8_T 93 template<
typename _Iter,
94 typename _Iter_traits = std::iterator_traits<_Iter>>
95 using __is_path_iter_src
96 = __and_<__is_encoded_char<typename _Iter_traits::value_type>,
98 typename _Iter_traits::iterator_category>>;
100 template<
typename _Iter>
101 static __is_path_iter_src<_Iter>
102 __is_path_src(_Iter,
int);
104 template<
typename _CharT,
typename _Traits,
typename _Alloc>
105 static __is_encoded_char<_CharT>
108 #if __cplusplus >= 201402L 109 template<
typename _CharT,
typename _Traits>
110 static __is_encoded_char<_CharT>
111 __is_path_src(
const basic_string_view<_CharT, _Traits>&,
int);
114 template<
typename _Unknown>
116 __is_path_src(
const _Unknown&, ...);
118 template<
typename _Tp1,
typename _Tp2>
119 struct __constructible_from;
121 template<
typename _Iter>
122 struct __constructible_from<_Iter, _Iter>
123 : __is_path_iter_src<_Iter>
126 template<
typename _Source>
127 struct __constructible_from<_Source, void>
128 : decltype(__is_path_src(std::declval<_Source>(), 0))
131 template<
typename _Tp1,
typename _Tp2 = void,
132 typename _Tp1_nocv =
typename remove_cv<_Tp1>::type,
133 typename _Tp1_noptr =
typename remove_pointer<_Tp1>::type>
134 using _Path =
typename 136 __not_<is_void<_Tp1_noptr>>,
137 __constructible_from<_Tp1, _Tp2>>::value,
140 template<
typename _Source>
142 _S_range_begin(_Source __begin) {
return __begin; }
144 struct __null_terminated { };
146 template<
typename _Source>
147 static __null_terminated
148 _S_range_end(_Source) {
return {}; }
150 template<
typename _CharT,
typename _Traits,
typename _Alloc>
153 {
return __str.
data(); }
155 template<
typename _CharT,
typename _Traits,
typename _Alloc>
158 {
return __str.
data() + __str.
size(); }
160 #if __cplusplus >= 201402L 161 template<
typename _CharT,
typename _Traits>
163 _S_range_begin(
const basic_string_view<_CharT, _Traits>& __str)
164 {
return __str.data(); }
166 template<
typename _CharT,
typename _Traits>
168 _S_range_end(
const basic_string_view<_CharT, _Traits>& __str)
169 {
return __str.data() + __str.size(); }
172 template<
typename _Tp,
173 typename _Iter = decltype(_S_range_begin(std::declval<_Tp>())),
174 typename _Val =
typename std::iterator_traits<_Iter>::value_type>
180 #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS 181 typedef wchar_t value_type;
182 static constexpr value_type preferred_separator = L
'\\';
184 typedef char value_type;
185 static constexpr value_type preferred_separator =
'/';
196 : _M_pathname(std::move(__p._M_pathname)), _M_type(__p._M_type)
202 path(string_type&& __source)
203 : _M_pathname(std::move(__source))
204 { _M_split_cmpts(); }
206 template<
typename _Source,
207 typename _Require = _Path<_Source>>
208 path(_Source
const& __source)
209 : _M_pathname(_S_convert(_S_range_begin(__source),
210 _S_range_end(__source)))
211 { _M_split_cmpts(); }
213 template<
typename _InputIterator,
214 typename _Require = _Path<_InputIterator, _InputIterator>>
215 path(_InputIterator __first, _InputIterator __last)
216 : _M_pathname(_S_convert(__first, __last))
217 { _M_split_cmpts(); }
219 template<
typename _Source,
220 typename _Require = _Path<_Source>,
221 typename _Require2 = __value_type_is_char<_Source>>
222 path(_Source
const& __source,
const locale& __loc)
223 : _M_pathname(_S_convert_loc(_S_range_begin(__source),
224 _S_range_end(__source), __loc))
225 { _M_split_cmpts(); }
227 template<
typename _InputIterator,
228 typename _Require = _Path<_InputIterator, _InputIterator>,
229 typename _Require2 = __value_type_is_char<_InputIterator>>
230 path(_InputIterator __first, _InputIterator __last,
const locale& __loc)
231 : _M_pathname(_S_convert_loc(__first, __last, __loc))
232 { _M_split_cmpts(); }
238 path& operator=(
const path& __p) =
default;
239 path& operator=(path&& __p) noexcept;
240 path& operator=(string_type&& __source);
241 path& assign(string_type&& __source);
243 template<
typename _Source>
245 operator=(_Source
const& __source)
246 {
return *
this = path(__source); }
248 template<
typename _Source>
250 assign(_Source
const& __source)
251 {
return *
this = path(__source); }
253 template<
typename _InputIterator>
254 _Path<_InputIterator, _InputIterator>&
255 assign(_InputIterator __first, _InputIterator __last)
256 {
return *
this = path(__first, __last); }
260 path& operator/=(
const path& __p) {
return _M_append(__p._M_pathname); }
262 template <
class _Source>
264 operator/=(_Source
const& __source)
265 {
return append(__source); }
267 template<
typename _Source>
269 append(_Source
const& __source)
271 return _M_append(_S_convert(_S_range_begin(__source),
272 _S_range_end(__source)));
275 template<
typename _InputIterator>
276 _Path<_InputIterator, _InputIterator>&
277 append(_InputIterator __first, _InputIterator __last)
278 {
return _M_append(_S_convert(__first, __last)); }
282 path& operator+=(
const path& __x);
283 path& operator+=(
const string_type& __x);
284 path& operator+=(
const value_type* __x);
285 path& operator+=(value_type __x);
286 #if __cplusplus >= 201402L 287 path& operator+=(basic_string_view<value_type> __x);
290 template<
typename _Source>
292 operator+=(_Source
const& __x) {
return concat(__x); }
294 template<
typename _CharT>
295 _Path<_CharT*, _CharT*>&
296 operator+=(_CharT __x);
298 template<
typename _Source>
300 concat(_Source
const& __x)
301 {
return *
this += _S_convert(_S_range_begin(__x), _S_range_end(__x)); }
303 template<
typename _InputIterator>
304 _Path<_InputIterator, _InputIterator>&
305 concat(_InputIterator __first, _InputIterator __last)
306 {
return *
this += _S_convert(__first, __last); }
310 void clear() noexcept { _M_pathname.clear(); _M_split_cmpts(); }
312 path& make_preferred();
313 path& remove_filename();
314 path& replace_filename(
const path& __replacement);
315 path& replace_extension(
const path& __replacement = path());
317 void swap(path& __rhs) noexcept;
321 const string_type& native()
const noexcept {
return _M_pathname; }
322 const value_type* c_str()
const noexcept {
return _M_pathname.c_str(); }
323 operator string_type()
const {
return _M_pathname; }
325 template<
typename _CharT,
typename _Traits = std::
char_traits<_CharT>,
326 typename _Allocator = std::allocator<_CharT>>
328 string(
const _Allocator& __a = _Allocator())
const;
331 #if _GLIBCXX_USE_WCHAR_T 334 #ifdef _GLIBCXX_USE_CHAR8_T 335 __attribute__((__abi_tag__(
"__u8")))
336 std::u8string u8string()
const;
339 #endif // _GLIBCXX_USE_CHAR8_T 344 template<
typename _CharT,
typename _Traits = std::
char_traits<_CharT>,
345 typename _Allocator = std::allocator<_CharT>>
347 generic_string(
const _Allocator& __a = _Allocator())
const;
350 #if _GLIBCXX_USE_WCHAR_T 353 #ifdef _GLIBCXX_USE_CHAR8_T 354 __attribute__((__abi_tag__(
"__u8")))
355 std::u8string generic_u8string()
const;
358 #endif // _GLIBCXX_USE_CHAR8_T 364 int compare(
const path& __p)
const noexcept;
365 int compare(
const string_type& __s)
const;
366 int compare(
const value_type* __s)
const;
367 #if __cplusplus >= 201402L 368 int compare(
const basic_string_view<value_type> __s)
const;
373 path root_name()
const;
374 path root_directory()
const;
375 path root_path()
const;
376 path relative_path()
const;
377 path parent_path()
const;
378 path filename()
const;
380 path extension()
const;
384 _GLIBCXX_NODISCARD
bool empty()
const noexcept {
return _M_pathname.empty(); }
385 bool has_root_name()
const;
386 bool has_root_directory()
const;
387 bool has_root_path()
const;
388 bool has_relative_path()
const;
389 bool has_parent_path()
const;
390 bool has_filename()
const;
391 bool has_stem()
const;
392 bool has_extension()
const;
393 bool is_absolute()
const;
394 bool is_relative()
const {
return !is_absolute(); }
404 template<
typename _InputIterator,
405 typename _Traits = std::iterator_traits<_InputIterator>,
407 =
typename std::remove_cv<typename _Traits::value_type>::type>
409 _S_string_from_iter(_InputIterator __source)
412 for (_CharT __ch = *__source; __ch != _CharT(); __ch = *++__source)
418 enum class _Type : unsigned char {
419 _Multi, _Root_name, _Root_dir, _Filename
422 path(string_type __str, _Type __type) : _M_pathname(__str), _M_type(__type)
424 __glibcxx_assert(!empty());
425 __glibcxx_assert(_M_type != _Type::_Multi);
428 enum class _Split { _Stem, _Extension };
430 path& _M_append(
const string_type& __str)
432 if (!_M_pathname.empty() && !_S_is_dir_sep(_M_pathname.back())
433 && !__str.
empty() && !_S_is_dir_sep(__str.
front()))
434 _M_pathname += preferred_separator;
435 _M_pathname += __str;
442 template<
typename _CharT>
446 _S_convert(value_type* __src, __null_terminated)
447 {
return string_type(__src); }
450 _S_convert(
const value_type* __src, __null_terminated)
451 {
return string_type(__src); }
453 template<
typename _Iter>
455 _S_convert(_Iter __first, _Iter __last)
457 using __value_type =
typename std::iterator_traits<_Iter>::value_type;
458 return _Cvt<typename remove_cv<__value_type>::type>::
459 _S_convert(__first, __last);
462 template<
typename _InputIterator>
464 _S_convert(_InputIterator __src, __null_terminated)
466 auto __s = _S_string_from_iter(__src);
467 return _S_convert(__s.c_str(), __s.c_str() + __s.size());
471 _S_convert_loc(
const char* __first,
const char* __last,
474 template<
typename _Iter>
476 _S_convert_loc(_Iter __first, _Iter __last,
const std::locale& __loc)
479 return _S_convert_loc(__str.data(), __str.data()+__str.size(), __loc);
482 template<
typename _InputIterator>
484 _S_convert_loc(_InputIterator __src, __null_terminated,
488 return _S_convert_loc(__s.data(), __s.data() + __s.size(), __loc);
491 bool _S_is_dir_sep(value_type __ch)
493 #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS 494 return __ch == L
'/' || __ch == preferred_separator;
500 void _M_split_cmpts();
502 void _M_add_root_name(
size_t __n);
503 void _M_add_root_dir(
size_t __pos);
504 void _M_add_filename(
size_t __pos,
size_t __n);
506 string_type _M_pathname;
509 using _List = _GLIBCXX_STD_C::vector<_Cmpt>;
511 _Type _M_type = _Type::_Multi;
514 inline void swap(
path& __lhs,
path& __rhs) noexcept { __lhs.swap(__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 !(__rhs < __lhs); }
527 inline bool operator>(
const path& __lhs,
const path& __rhs) noexcept
528 {
return __rhs < __lhs; }
531 inline bool operator>=(
const path& __lhs,
const path& __rhs) noexcept
532 {
return !(__lhs < __rhs); }
535 inline bool operator==(
const path& __lhs,
const path& __rhs) noexcept
536 {
return __lhs.compare(__rhs) == 0; }
539 inline bool operator!=(
const path& __lhs,
const path& __rhs) noexcept
540 {
return !(__lhs == __rhs); }
545 path __result(__lhs);
551 template<
typename _CharT,
typename _Traits>
553 operator<<(basic_ostream<_CharT, _Traits>& __os,
const path& __p)
555 auto __tmp = __p.string<_CharT, _Traits>();
556 using __quoted_string
558 __os << __quoted_string{__tmp, _CharT(
'"'), _CharT(
'\\')};
563 template<
typename _CharT,
typename _Traits>
568 using __quoted_string
570 if (__is >> __quoted_string{ __tmp, _CharT(
'"'), _CharT(
'\\') })
571 __p = std::move(__tmp);
576 template<
typename _Source>
580 #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS 583 return path{ __source };
588 template<
typename _InputIterator>
590 u8path(_InputIterator __first, _InputIterator __last)
592 #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS 595 return path{ __first, __last };
602 filesystem_error(
const string& __what_arg,
error_code __ec)
605 filesystem_error(
const string& __what_arg,
const path& __p1,
609 filesystem_error(
const string& __what_arg,
const path& __p1,
611 :
system_error(__ec, __what_arg), _M_path1(__p1), _M_path2(__p2)
616 const path& path1()
const noexcept {
return _M_path1; }
617 const path& path2()
const noexcept {
return _M_path2; }
618 const char* what()
const noexcept {
return _M_what.c_str(); }
628 struct path::_Cmpt :
path 630 _Cmpt(string_type __s, _Type __t,
size_t __pos)
631 :
path(std::move(__s), __t), _M_pos(__pos) { }
633 _Cmpt() : _M_pos(-1) { }
640 struct path::_Cvt<path::value_type>
642 template<
typename _Iter>
644 _S_convert(_Iter __first, _Iter __last)
645 {
return string_type{__first, __last}; }
648 template<
typename _CharT>
651 #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS 653 _S_wconvert(
const char* __f,
const char* __l,
true_type)
656 const auto& __cvt = std::use_facet<_Cvt>(
std::locale{});
658 if (__str_codecvt_in(__f, __l, __wstr, __cvt))
660 _GLIBCXX_THROW_OR_ABORT(filesystem_error(
661 "Cannot convert character sequence",
662 std::make_error_code(errc::illegal_byte_sequence)));
666 _S_wconvert(
const _CharT* __f,
const _CharT* __l,
false_type)
668 std::codecvt_utf8<_CharT> __cvt;
670 if (__str_codecvt_out(__f, __l, __str, __cvt))
672 const char* __f2 = __str.
data();
673 const char* __l2 = __f2 + __str.size();
674 std::codecvt_utf8<wchar_t> __wcvt;
676 if (__str_codecvt_in(__f2, __l2, __wstr, __wcvt))
679 _GLIBCXX_THROW_OR_ABORT(filesystem_error(
680 "Cannot convert character sequence",
681 std::make_error_code(errc::illegal_byte_sequence)));
685 _S_convert(
const _CharT* __f,
const _CharT* __l)
691 _S_convert(
const _CharT* __f,
const _CharT* __l)
693 #ifdef _GLIBCXX_USE_CHAR8_T 696 string_type __str(__f, __l);
702 std::codecvt_utf8<_CharT> __cvt;
704 if (__str_codecvt_out(__f, __l, __str, __cvt))
706 #ifdef _GLIBCXX_USE_CHAR8_T 709 _GLIBCXX_THROW_OR_ABORT(filesystem_error(
710 "Cannot convert character sequence",
711 std::make_error_code(errc::illegal_byte_sequence)));
716 _S_convert(_CharT* __f, _CharT* __l)
718 return _S_convert(const_cast<const _CharT*>(__f),
719 const_cast<const _CharT*>(__l));
722 template<
typename _Iter>
724 _S_convert(_Iter __first, _Iter __last)
727 return _S_convert(__str.
data(), __str.
data() + __str.
size());
730 template<
typename _Iter,
typename _Cont>
732 _S_convert(__gnu_cxx::__normal_iterator<_Iter, _Cont> __first,
733 __gnu_cxx::__normal_iterator<_Iter, _Cont> __last)
734 {
return _S_convert(__first.base(), __last.base()); }
741 using difference_type = std::ptrdiff_t;
747 iterator() : _M_path(
nullptr), _M_cur(), _M_at_end() { }
756 iterator operator++(
int) {
auto __tmp = *
this; ++*
this;
return __tmp; }
759 iterator operator--(
int) {
auto __tmp = *
this; --*
this;
return __tmp; }
762 {
return __lhs._M_equals(__rhs); }
765 {
return !__lhs._M_equals(__rhs); }
770 iterator(
const path* __path, path::_List::const_iterator __iter)
771 : _M_path(__path), _M_cur(__iter), _M_at_end()
774 iterator(
const path* __path,
bool __at_end)
775 : _M_path(__path), _M_cur(), _M_at_end(__at_end)
781 path::_List::const_iterator _M_cur;
787 path::operator=(path&& __p) noexcept
789 _M_pathname = std::move(__p._M_pathname);
790 _M_cmpts = std::move(__p._M_cmpts);
791 _M_type = __p._M_type;
798 {
return *
this = path(std::move(__source)); }
802 {
return *
this = path(std::move(__source)); }
805 path::operator+=(
const path& __p)
807 return operator+=(__p.native());
834 #if __cplusplus >= 201402L 836 path::operator+=(basic_string_view<value_type> __x)
838 _M_pathname.append(__x.data(), __x.size());
844 template<
typename _CharT>
845 inline path::_Path<_CharT*, _CharT*>&
846 path::operator+=(_CharT __x)
849 return concat(__addr, __addr + 1);
853 path::make_preferred()
855 #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS 856 std::replace(_M_pathname.begin(), _M_pathname.end(), L
'/',
857 preferred_separator);
862 inline void path::swap(path& __rhs) noexcept
864 _M_pathname.swap(__rhs._M_pathname);
865 _M_cmpts.swap(__rhs._M_cmpts);
866 std::swap(_M_type, __rhs._M_type);
869 template<
typename _CharT,
typename _Traits,
typename _Allocator>
874 return { _M_pathname.
begin(), _M_pathname.end(), __a };
876 const value_type* __first = _M_pathname.data();
877 const value_type* __last = __first + _M_pathname.size();
879 #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS 880 using _CharAlloc = __alloc_rebind<_Allocator, char>;
885 codecvt_utf8<value_type> __cvt;
886 _String __u8str{_CharAlloc{__a}};
887 if (__str_codecvt_out(__first, __last, __u8str, __cvt))
892 operator()(
const _String& __from, _String&,
true_type)
896 operator()(
const _String& __from, _WString& __to,
false_type)
898 #ifdef _GLIBCXX_USE_CHAR8_T 901 __to.assign(__from.begin(), __from.end());
908 codecvt_utf8<_CharT> __cvt;
909 const char* __f = __from.data();
910 const char* __l = __f + __from.size();
911 if (__str_codecvt_in(__f, __l, __to, __cvt))
913 #ifdef _GLIBCXX_USE_CHAR8_T 924 #ifdef _GLIBCXX_USE_CHAR8_T 933 codecvt_utf8<_CharT> __cvt;
935 if (__str_codecvt_in(__first, __last, __wstr, __cvt))
937 #ifdef _GLIBCXX_USE_CHAR8_T 941 _GLIBCXX_THROW_OR_ABORT(filesystem_error(
942 "Cannot convert character sequence",
943 std::make_error_code(errc::illegal_byte_sequence)));
949 #if _GLIBCXX_USE_WCHAR_T 954 #ifdef _GLIBCXX_USE_CHAR8_T 956 path::u8string()
const {
return string<char8_t>(); }
959 path::u8string()
const 961 #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS 964 codecvt_utf8<value_type> __cvt;
965 const value_type* __first = _M_pathname.data();
966 const value_type* __last = __first + _M_pathname.size();
967 if (__str_codecvt_out(__first, __last, __str, __cvt))
969 _GLIBCXX_THROW_OR_ABORT(filesystem_error(
970 "Cannot convert character sequence",
971 std::make_error_code(errc::illegal_byte_sequence)));
976 #endif // _GLIBCXX_USE_CHAR8_T 984 #ifndef _GLIBCXX_FILESYSTEM_IS_WINDOWS 985 template<
typename _CharT,
typename _Traits,
typename _Allocator>
987 path::generic_string(
const _Allocator& __a)
const 988 {
return string<_CharT, _Traits, _Allocator>(__a); }
991 path::generic_string()
const {
return string(); }
993 #if _GLIBCXX_USE_WCHAR_T 995 path::generic_wstring()
const {
return wstring(); }
998 #ifdef _GLIBCXX_USE_CHAR8_T 1000 path::generic_u8string()
const {
return u8string(); }
1003 path::generic_u8string()
const {
return u8string(); }
1007 path::generic_u16string()
const {
return u16string(); }
1010 path::generic_u32string()
const {
return u32string(); }
1014 path::compare(
const string_type& __s)
const {
return compare(path(__s)); }
1017 path::compare(
const value_type* __s)
const {
return compare(path(__s)); }
1019 #if __cplusplus >= 201402L 1021 path::compare(basic_string_view<value_type> __s)
const 1022 {
return compare(path(__s)); }
1026 path::filename()
const {
return empty() ? path() : *--
end(); }
1031 auto ext = _M_find_extension();
1032 if (ext.first && ext.second != 0)
1033 return path{ext.first->substr(0, ext.second)};
1038 path::extension()
const 1040 auto ext = _M_find_extension();
1042 return path{ext.first->substr(ext.second)};
1047 path::has_stem()
const 1049 auto ext = _M_find_extension();
1050 return ext.first && ext.second != 0;
1054 path::has_extension()
const 1056 auto ext = _M_find_extension();
1061 path::is_absolute()
const 1063 #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS 1064 return has_root_name() && has_root_directory();
1066 return has_root_directory();
1073 if (_M_type == _Type::_Multi)
1074 return iterator(
this, _M_cmpts.begin());
1081 if (_M_type == _Type::_Multi)
1082 return iterator(
this, _M_cmpts.end());
1087 path::iterator::operator++()
1089 __glibcxx_assert(_M_path !=
nullptr);
1090 if (_M_path->_M_type == _Type::_Multi)
1092 __glibcxx_assert(_M_cur != _M_path->_M_cmpts.end());
1097 __glibcxx_assert(!_M_at_end);
1104 path::iterator::operator--()
1106 __glibcxx_assert(_M_path !=
nullptr);
1107 if (_M_path->_M_type == _Type::_Multi)
1109 __glibcxx_assert(_M_cur != _M_path->_M_cmpts.begin());
1114 __glibcxx_assert(_M_at_end);
1121 path::iterator::operator*()
const 1123 __glibcxx_assert(_M_path !=
nullptr);
1124 if (_M_path->_M_type == _Type::_Multi)
1126 __glibcxx_assert(_M_cur != _M_path->_M_cmpts.end());
1133 path::iterator::_M_equals(
iterator __rhs)
const 1135 if (_M_path != __rhs._M_path)
1137 if (_M_path ==
nullptr)
1139 if (_M_path->_M_type == path::_Type::_Multi)
1140 return _M_cur == __rhs._M_cur;
1141 return _M_at_end == __rhs._M_at_end;
1145 _GLIBCXX_END_NAMESPACE_CXX11
1150 _GLIBCXX_END_NAMESPACE_VERSION
1155 #endif // _GLIBCXX_EXPERIMENTAL_FS_PATH_H path u8path(const _Source &__source)
Compare paths.
Template class basic_istream.
Thrown to indicate error code of underlying system.
_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.
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.
Define a member typedef type only if a boolean constant is true.
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.
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.
_GLIBCXX_NODISCARD bool empty() const noexcept
size_t hash_value(const path &__p) noexcept
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.