summaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/include/__filesystem
diff options
context:
space:
mode:
authorAlexSm <[email protected]>2024-03-05 10:40:59 +0100
committerGitHub <[email protected]>2024-03-05 12:40:59 +0300
commit1ac13c847b5358faba44dbb638a828e24369467b (patch)
tree07672b4dd3604ad3dee540a02c6494cb7d10dc3d /contrib/libs/cxxsupp/libcxx/include/__filesystem
parentffcca3e7f7958ddc6487b91d3df8c01054bd0638 (diff)
Library import 16 (#2433)
Co-authored-by: robot-piglet <[email protected]> Co-authored-by: deshevoy <[email protected]> Co-authored-by: robot-contrib <[email protected]> Co-authored-by: thegeorg <[email protected]> Co-authored-by: robot-ya-builder <[email protected]> Co-authored-by: svidyuk <[email protected]> Co-authored-by: shadchin <[email protected]> Co-authored-by: robot-ratatosk <[email protected]> Co-authored-by: innokentii <[email protected]> Co-authored-by: arkady-e1ppa <[email protected]> Co-authored-by: snermolaev <[email protected]> Co-authored-by: dimdim11 <[email protected]> Co-authored-by: kickbutt <[email protected]> Co-authored-by: abdullinsaid <[email protected]> Co-authored-by: korsunandrei <[email protected]> Co-authored-by: petrk <[email protected]> Co-authored-by: miroslav2 <[email protected]> Co-authored-by: serjflint <[email protected]> Co-authored-by: akhropov <[email protected]> Co-authored-by: prettyboy <[email protected]> Co-authored-by: ilikepugs <[email protected]> Co-authored-by: hiddenpath <[email protected]> Co-authored-by: mikhnenko <[email protected]> Co-authored-by: spreis <[email protected]> Co-authored-by: andreyshspb <[email protected]> Co-authored-by: dimaandreev <[email protected]> Co-authored-by: rashid <[email protected]> Co-authored-by: robot-ydb-importer <[email protected]> Co-authored-by: r-vetrov <[email protected]> Co-authored-by: ypodlesov <[email protected]> Co-authored-by: zaverden <[email protected]> Co-authored-by: vpozdyayev <[email protected]> Co-authored-by: robot-cozmo <[email protected]> Co-authored-by: v-korovin <[email protected]> Co-authored-by: arikon <[email protected]> Co-authored-by: khoden <[email protected]> Co-authored-by: psydmm <[email protected]> Co-authored-by: robot-javacom <[email protected]> Co-authored-by: dtorilov <[email protected]> Co-authored-by: sennikovmv <[email protected]> Co-authored-by: hcpp <[email protected]>
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/__filesystem')
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__filesystem/copy_options.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_entry.h35
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_iterator.h38
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_options.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__filesystem/file_status.h22
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__filesystem/filesystem_error.h63
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__filesystem/operations.h72
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__filesystem/path.h48
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__filesystem/path_iterator.h30
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__filesystem/perm_options.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__filesystem/perms.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__filesystem/recursive_directory_iterator.h62
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__filesystem/space_info.h8
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__filesystem/u8path.h5
14 files changed, 191 insertions, 208 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/copy_options.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/copy_options.h
index 96c7535812e..11962e494c9 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/copy_options.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/copy_options.h
@@ -21,8 +21,6 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
-
enum class _LIBCPP_ENUM_VIS copy_options : unsigned short {
none = 0,
skip_existing = 1,
@@ -75,8 +73,6 @@ inline copy_options& operator^=(copy_options& __lhs, copy_options __rhs) {
return __lhs = __lhs ^ __rhs;
}
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
-
_LIBCPP_END_NAMESPACE_FILESYSTEM
#endif // _LIBCPP_CXX03_LANG
diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_entry.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_entry.h
index b17eaaab4c5..bb7a061db4c 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_entry.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_entry.h
@@ -12,8 +12,8 @@
#include <__availability>
#include <__chrono/time_point.h>
+#include <__compare/ordering.h>
#include <__config>
-#include <__errc>
#include <__filesystem/file_status.h>
#include <__filesystem/file_time_type.h>
#include <__filesystem/file_type.h>
@@ -21,11 +21,12 @@
#include <__filesystem/operations.h>
#include <__filesystem/path.h>
#include <__filesystem/perms.h>
+#include <__system_error/errc.h>
+#include <__system_error/error_code.h>
+#include <__utility/move.h>
#include <__utility/unreachable.h>
#include <cstdint>
-#include <cstdlib>
#include <iosfwd>
-#include <system_error>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -34,21 +35,20 @@
_LIBCPP_PUSH_MACROS
#include <__undef_macros>
-#ifndef _LIBCPP_CXX03_LANG
+#if !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
-
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
class directory_entry {
typedef _VSTD_FS::path _Path;
public:
// constructors and destructors
- directory_entry() noexcept = default;
- directory_entry(directory_entry const&) = default;
- directory_entry(directory_entry&&) noexcept = default;
+ _LIBCPP_HIDE_FROM_ABI directory_entry() noexcept = default;
+ _LIBCPP_HIDE_FROM_ABI directory_entry(directory_entry const&) = default;
+ _LIBCPP_HIDE_FROM_ABI directory_entry(directory_entry&&) noexcept = default;
_LIBCPP_INLINE_VISIBILITY
explicit directory_entry(_Path const& __p) : __p_(__p) {
@@ -61,10 +61,10 @@ public:
__refresh(&__ec);
}
- ~directory_entry() {}
+ _LIBCPP_HIDE_FROM_ABI ~directory_entry() {}
- directory_entry& operator=(directory_entry const&) = default;
- directory_entry& operator=(directory_entry&&) noexcept = default;
+ _LIBCPP_HIDE_FROM_ABI directory_entry& operator=(directory_entry const&) = default;
+ _LIBCPP_HIDE_FROM_ABI directory_entry& operator=(directory_entry&&) noexcept = default;
_LIBCPP_INLINE_VISIBILITY
void assign(_Path const& __p) {
@@ -321,8 +321,7 @@ private:
__data_ = __dt;
}
- _LIBCPP_FUNC_VIS
- error_code __do_refresh() noexcept;
+ _LIBCPP_EXPORTED_FROM_ABI error_code __do_refresh() noexcept;
_LIBCPP_INLINE_VISIBILITY
static bool __is_dne_error(error_code const& __ec) {
@@ -510,17 +509,17 @@ public:
private:
friend class directory_iterator;
friend class recursive_directory_iterator;
- explicit __dir_element_proxy(directory_entry const& __e) : __elem_(__e) {}
- __dir_element_proxy(__dir_element_proxy&& __o)
+ _LIBCPP_HIDE_FROM_ABI explicit __dir_element_proxy(directory_entry const& __e) : __elem_(__e) {}
+ _LIBCPP_HIDE_FROM_ABI __dir_element_proxy(__dir_element_proxy&& __o)
: __elem_(_VSTD::move(__o.__elem_)) {}
directory_entry __elem_;
};
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
_LIBCPP_END_NAMESPACE_FILESYSTEM
-#endif // _LIBCPP_CXX03_LANG
+#endif // !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
_LIBCPP_POP_MACROS
diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_iterator.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_iterator.h
index 5ff2f01ac7b..632c2c80636 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_iterator.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_iterator.h
@@ -16,22 +16,24 @@
#include <__filesystem/directory_entry.h>
#include <__filesystem/directory_options.h>
#include <__filesystem/path.h>
+#include <__iterator/default_sentinel.h>
#include <__iterator/iterator_traits.h>
#include <__memory/shared_ptr.h>
#include <__ranges/enable_borrowed_range.h>
#include <__ranges/enable_view.h>
+#include <__system_error/error_code.h>
+#include <__utility/move.h>
#include <cstddef>
-#include <system_error>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
-#ifndef _LIBCPP_CXX03_LANG
+#if !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
class _LIBCPP_HIDDEN __dir_stream;
class directory_iterator {
@@ -81,7 +83,7 @@ public:
_LIBCPP_HIDE_FROM_ABI
const directory_entry& operator*() const {
- _LIBCPP_ASSERT(__imp_, "The end iterator cannot be dereferenced");
+ _LIBCPP_ASSERT_UNCATEGORIZED(__imp_, "The end iterator cannot be dereferenced");
return __dereference();
}
@@ -101,21 +103,23 @@ public:
_LIBCPP_HIDE_FROM_ABI
directory_iterator& increment(error_code& __ec) { return __increment(&__ec); }
+# if _LIBCPP_STD_VER >= 20
+
+ _LIBCPP_HIDE_FROM_ABI bool operator==(default_sentinel_t) const noexcept { return *this == directory_iterator(); }
+
+# endif
+
private:
inline _LIBCPP_HIDE_FROM_ABI friend bool
operator==(const directory_iterator& __lhs,
const directory_iterator& __rhs) noexcept;
// construct the dir_stream
- _LIBCPP_FUNC_VIS
- directory_iterator(const path&, error_code*,
- directory_options = directory_options::none);
+ _LIBCPP_EXPORTED_FROM_ABI directory_iterator(const path&, error_code*, directory_options = directory_options::none);
- _LIBCPP_FUNC_VIS
- directory_iterator& __increment(error_code* __ec = nullptr);
+ _LIBCPP_EXPORTED_FROM_ABI directory_iterator& __increment(error_code* __ec = nullptr);
- _LIBCPP_FUNC_VIS
- const directory_entry& __dereference() const;
+ _LIBCPP_EXPORTED_FROM_ABI const directory_entry& __dereference() const;
private:
shared_ptr<__dir_stream> __imp_;
@@ -144,22 +148,22 @@ end(directory_iterator) noexcept {
return directory_iterator();
}
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
_LIBCPP_END_NAMESPACE_FILESYSTEM
-#if _LIBCPP_STD_VER > 17
+#if _LIBCPP_STD_VER >= 20
template <>
-_LIBCPP_AVAILABILITY_FILESYSTEM
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY
inline constexpr bool _VSTD::ranges::enable_borrowed_range<_VSTD_FS::directory_iterator> = true;
template <>
-_LIBCPP_AVAILABILITY_FILESYSTEM
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY
inline constexpr bool _VSTD::ranges::enable_view<_VSTD_FS::directory_iterator> = true;
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCPP_STD_VER >= 20
-#endif // _LIBCPP_CXX03_LANG
+#endif // !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
#endif // _LIBCPP___FILESYSTEM_DIRECTORY_ITERATOR_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_options.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_options.h
index c5c031a567c..4c323ccb0cf 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_options.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/directory_options.h
@@ -21,8 +21,6 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
-
enum class _LIBCPP_ENUM_VIS directory_options : unsigned char {
none = 0,
follow_directory_symlink = 1,
@@ -73,8 +71,6 @@ inline directory_options& operator^=(directory_options& __lhs,
return __lhs = __lhs ^ __rhs;
}
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
-
_LIBCPP_END_NAMESPACE_FILESYSTEM
#endif // _LIBCPP_CXX03_LANG
diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/file_status.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/file_status.h
index ac3f6cbed9d..0cf405b9c29 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/file_status.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/file_status.h
@@ -23,9 +23,7 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
-
-class _LIBCPP_TYPE_VIS file_status {
+class _LIBCPP_EXPORTED_FROM_ABI file_status {
public:
// constructors
_LIBCPP_INLINE_VISIBILITY
@@ -35,14 +33,14 @@ public:
: __ft_(__ft),
__prms_(__prms) {}
- file_status(const file_status&) noexcept = default;
- file_status(file_status&&) noexcept = default;
+ _LIBCPP_HIDE_FROM_ABI file_status(const file_status&) noexcept = default;
+ _LIBCPP_HIDE_FROM_ABI file_status(file_status&&) noexcept = default;
_LIBCPP_INLINE_VISIBILITY
~file_status() {}
- file_status& operator=(const file_status&) noexcept = default;
- file_status& operator=(file_status&&) noexcept = default;
+ _LIBCPP_HIDE_FROM_ABI file_status& operator=(const file_status&) noexcept = default;
+ _LIBCPP_HIDE_FROM_ABI file_status& operator=(file_status&&) noexcept = default;
// observers
_LIBCPP_INLINE_VISIBILITY
@@ -58,13 +56,19 @@ public:
_LIBCPP_INLINE_VISIBILITY
void permissions(perms __p) noexcept { __prms_ = __p; }
+# if _LIBCPP_STD_VER >= 20
+
+ _LIBCPP_HIDE_FROM_ABI friend bool operator==(const file_status& __lhs, const file_status& __rhs) noexcept {
+ return __lhs.type() == __rhs.type() && __lhs.permissions() == __rhs.permissions();
+ }
+
+# endif
+
private:
file_type __ft_;
perms __prms_;
};
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
-
_LIBCPP_END_NAMESPACE_FILESYSTEM
#endif // _LIBCPP_CXX03_LANG
diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/filesystem_error.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/filesystem_error.h
index effe6998338..713cc357ee8 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/filesystem_error.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/filesystem_error.h
@@ -14,11 +14,13 @@
#include <__config>
#include <__filesystem/path.h>
#include <__memory/shared_ptr.h>
+#include <__system_error/error_code.h>
+#include <__system_error/system_error.h>
#include <__utility/forward.h>
+#include <__verbose_abort>
#include <iosfwd>
#include <new>
-#include <system_error>
-#include <type_traits>
+#include <string>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
@@ -28,50 +30,38 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-class _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_EXCEPTION_ABI filesystem_error : public system_error {
+class _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY _LIBCPP_EXPORTED_FROM_ABI filesystem_error : public system_error {
public:
- _LIBCPP_INLINE_VISIBILITY
- filesystem_error(const string& __what, error_code __ec)
- : system_error(__ec, __what),
- __storage_(make_shared<_Storage>(path(), path())) {
+ _LIBCPP_HIDE_FROM_ABI filesystem_error(const string& __what, error_code __ec)
+ : system_error(__ec, __what), __storage_(make_shared<_Storage>(path(), path())) {
__create_what(0);
}
- _LIBCPP_INLINE_VISIBILITY
- filesystem_error(const string& __what, const path& __p1, error_code __ec)
- : system_error(__ec, __what),
- __storage_(make_shared<_Storage>(__p1, path())) {
+ _LIBCPP_HIDE_FROM_ABI filesystem_error(const string& __what, const path& __p1, error_code __ec)
+ : system_error(__ec, __what), __storage_(make_shared<_Storage>(__p1, path())) {
__create_what(1);
}
- _LIBCPP_INLINE_VISIBILITY
- filesystem_error(const string& __what, const path& __p1, const path& __p2,
- error_code __ec)
- : system_error(__ec, __what),
- __storage_(make_shared<_Storage>(__p1, __p2)) {
+ _LIBCPP_HIDE_FROM_ABI filesystem_error(const string& __what, const path& __p1, const path& __p2, error_code __ec)
+ : system_error(__ec, __what), __storage_(make_shared<_Storage>(__p1, __p2)) {
__create_what(2);
}
- _LIBCPP_INLINE_VISIBILITY
- const path& path1() const noexcept { return __storage_->__p1_; }
+ _LIBCPP_HIDE_FROM_ABI const path& path1() const noexcept { return __storage_->__p1_; }
- _LIBCPP_INLINE_VISIBILITY
- const path& path2() const noexcept { return __storage_->__p2_; }
+ _LIBCPP_HIDE_FROM_ABI const path& path2() const noexcept { return __storage_->__p2_; }
- filesystem_error(const filesystem_error&) = default;
+ _LIBCPP_HIDE_FROM_ABI filesystem_error(const filesystem_error&) = default;
~filesystem_error() override; // key function
_LIBCPP_HIDE_FROM_ABI_VIRTUAL
- const char* what() const noexcept override {
- return __storage_->__what_.c_str();
- }
+ const char* what() const noexcept override { return __storage_->__what_.c_str(); }
void __create_what(int __num_paths);
private:
struct _LIBCPP_HIDDEN _Storage {
- _LIBCPP_INLINE_VISIBILITY
- _Storage(const path& __p1, const path& __p2) : __p1_(__p1), __p2_(__p2) {}
+ _LIBCPP_HIDE_FROM_ABI _Storage(const path& __p1, const path& __p2) : __p1_(__p1), __p2_(__p2) {}
path __p1_;
path __p2_;
@@ -80,22 +70,19 @@ private:
shared_ptr<_Storage> __storage_;
};
-// TODO(ldionne): We need to pop the pragma and push it again after
-// filesystem_error to work around PR41078.
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
-
+# ifndef _LIBCPP_HAS_NO_EXCEPTIONS
template <class... _Args>
-_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
-#ifndef _LIBCPP_NO_EXCEPTIONS
-void __throw_filesystem_error(_Args&&... __args) {
+_LIBCPP_NORETURN inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY void
+__throw_filesystem_error(_Args&&... __args) {
throw filesystem_error(_VSTD::forward<_Args>(__args)...);
}
-#else
-void __throw_filesystem_error(_Args&&...) {
- _VSTD::abort();
+# else
+template <class... _Args>
+_LIBCPP_NORETURN inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY void
+__throw_filesystem_error(_Args&&...) {
+ _LIBCPP_VERBOSE_ABORT("filesystem_error was thrown in -fno-exceptions mode");
}
-#endif
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+# endif
_LIBCPP_END_NAMESPACE_FILESYSTEM
diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/operations.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/operations.h
index f48d301d090..71b3fb859d4 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/operations.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/operations.h
@@ -21,46 +21,46 @@
#include <__filesystem/perm_options.h>
#include <__filesystem/perms.h>
#include <__filesystem/space_info.h>
+#include <__system_error/error_code.h>
#include <cstdint>
-#include <system_error>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
-#ifndef _LIBCPP_CXX03_LANG
+#if !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
-
-_LIBCPP_FUNC_VIS path __absolute(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS path __canonical(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS bool __copy_file(const path& __from, const path& __to, copy_options __opt, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS void __copy_symlink(const path& __existing_symlink, const path& __new_symlink, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS void __copy(const path& __from, const path& __to, copy_options __opt, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS bool __create_directories(const path&, error_code* = nullptr);
-_LIBCPP_FUNC_VIS void __create_directory_symlink(const path& __to, const path& __new_symlink, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS bool __create_directory(const path&, error_code* = nullptr);
-_LIBCPP_FUNC_VIS bool __create_directory(const path&, const path& __attributes, error_code* = nullptr);
-_LIBCPP_FUNC_VIS void __create_hard_link(const path& __to, const path& __new_hard_link, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS void __create_symlink(const path& __to, const path& __new_symlink, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS path __current_path(error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS void __current_path(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS bool __equivalent(const path&, const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS file_status __status(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS uintmax_t __file_size(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS uintmax_t __hard_link_count(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS file_status __symlink_status(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS file_time_type __last_write_time(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS void __last_write_time(const path&, file_time_type __new_time, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS path __weakly_canonical(path const& __p, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS path __read_symlink(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS uintmax_t __remove_all(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS bool __remove(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS void __rename(const path& __from, const path& __to, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS void __resize_file(const path&, uintmax_t __size, error_code* = nullptr);
-_LIBCPP_FUNC_VIS path __temp_directory_path(error_code* __ec = nullptr);
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
+
+_LIBCPP_EXPORTED_FROM_ABI path __absolute(const path&, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI path __canonical(const path&, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI bool __copy_file(const path& __from, const path& __to, copy_options __opt, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI void __copy_symlink(const path& __existing_symlink, const path& __new_symlink, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI void __copy(const path& __from, const path& __to, copy_options __opt, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI bool __create_directories(const path&, error_code* = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI void __create_directory_symlink(const path& __to, const path& __new_symlink, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI bool __create_directory(const path&, error_code* = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI bool __create_directory(const path&, const path& __attributes, error_code* = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI void __create_hard_link(const path& __to, const path& __new_hard_link, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI void __create_symlink(const path& __to, const path& __new_symlink, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI path __current_path(error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI void __current_path(const path&, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI bool __equivalent(const path&, const path&, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI file_status __status(const path&, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI uintmax_t __file_size(const path&, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI uintmax_t __hard_link_count(const path&, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI file_status __symlink_status(const path&, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI file_time_type __last_write_time(const path&, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI void __last_write_time(const path&, file_time_type __new_time, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI path __weakly_canonical(path const& __p, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI path __read_symlink(const path&, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI uintmax_t __remove_all(const path&, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI bool __remove(const path&, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI void __rename(const path& __from, const path& __to, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI void __resize_file(const path&, uintmax_t __size, error_code* = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI path __temp_directory_path(error_code* __ec = nullptr);
inline _LIBCPP_HIDE_FROM_ABI path absolute(const path& __p) { return __absolute(__p); }
inline _LIBCPP_HIDE_FROM_ABI path absolute(const path& __p, error_code& __ec) { return __absolute(__p, &__ec); }
@@ -118,7 +118,7 @@ inline _LIBCPP_HIDE_FROM_ABI bool is_character_file(const path& __p, error_code&
inline _LIBCPP_HIDE_FROM_ABI bool is_directory(file_status __s) noexcept { return __s.type() == file_type::directory; }
inline _LIBCPP_HIDE_FROM_ABI bool is_directory(const path& __p) { return is_directory(__status(__p)); }
inline _LIBCPP_HIDE_FROM_ABI bool is_directory(const path& __p, error_code& __ec) noexcept { return is_directory(__status(__p, &__ec)); }
-_LIBCPP_FUNC_VIS bool __fs_is_empty(const path& __p, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI bool __fs_is_empty(const path& __p, error_code* __ec = nullptr);
inline _LIBCPP_HIDE_FROM_ABI bool is_empty(const path& __p) { return __fs_is_empty(__p); }
inline _LIBCPP_HIDE_FROM_ABI bool is_empty(const path& __p, error_code& __ec) { return __fs_is_empty(__p, &__ec); }
inline _LIBCPP_HIDE_FROM_ABI bool is_fifo(file_status __s) noexcept { return __s.type() == file_type::fifo; }
@@ -140,7 +140,7 @@ inline _LIBCPP_HIDE_FROM_ABI file_time_type last_write_time(const path& __p) { r
inline _LIBCPP_HIDE_FROM_ABI file_time_type last_write_time(const path& __p, error_code& __ec) noexcept { return __last_write_time(__p, &__ec); }
inline _LIBCPP_HIDE_FROM_ABI void last_write_time(const path& __p, file_time_type __t) { __last_write_time(__p, __t); }
inline _LIBCPP_HIDE_FROM_ABI void last_write_time(const path& __p, file_time_type __t, error_code& __ec) noexcept { __last_write_time(__p, __t, &__ec); }
-_LIBCPP_FUNC_VIS void __permissions(const path&, perms, perm_options, error_code* = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI void __permissions(const path&, perms, perm_options, error_code* = nullptr);
inline _LIBCPP_HIDE_FROM_ABI void permissions(const path& __p, perms __prms, perm_options __opts = perm_options::replace) { __permissions(__p, __prms, __opts); }
inline _LIBCPP_HIDE_FROM_ABI void permissions(const path& __p, perms __prms, error_code& __ec) noexcept { __permissions(__p, __prms, perm_options::replace, &__ec); }
inline _LIBCPP_HIDE_FROM_ABI void permissions(const path& __p, perms __prms, perm_options __opts, error_code& __ec) { __permissions(__p, __prms, __opts, &__ec); }
@@ -180,7 +180,7 @@ inline _LIBCPP_HIDE_FROM_ABI void rename(const path& __from, const path& __to) {
inline _LIBCPP_HIDE_FROM_ABI void rename(const path& __from, const path& __to, error_code& __ec) noexcept { return __rename(__from, __to, &__ec); }
inline _LIBCPP_HIDE_FROM_ABI void resize_file(const path& __p, uintmax_t __ns) { return __resize_file(__p, __ns); }
inline _LIBCPP_HIDE_FROM_ABI void resize_file(const path& __p, uintmax_t __ns, error_code& __ec) noexcept { return __resize_file(__p, __ns, &__ec); }
-_LIBCPP_FUNC_VIS space_info __space(const path&, error_code* __ec = nullptr);
+_LIBCPP_EXPORTED_FROM_ABI space_info __space(const path&, error_code* __ec = nullptr);
inline _LIBCPP_HIDE_FROM_ABI space_info space(const path& __p) { return __space(__p); }
inline _LIBCPP_HIDE_FROM_ABI space_info space(const path& __p, error_code& __ec) noexcept { return __space(__p, &__ec); }
inline _LIBCPP_HIDE_FROM_ABI file_status status(const path& __p) { return __status(__p); }
@@ -192,10 +192,10 @@ inline _LIBCPP_HIDE_FROM_ABI path temp_directory_path(error_code& __ec) { return
inline _LIBCPP_HIDE_FROM_ABI path weakly_canonical(path const& __p) { return __weakly_canonical(__p); }
inline _LIBCPP_HIDE_FROM_ABI path weakly_canonical(path const& __p, error_code& __ec) { return __weakly_canonical(__p, &__ec); }
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
_LIBCPP_END_NAMESPACE_FILESYSTEM
-#endif // _LIBCPP_CXX03_LANG
+#endif // !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
#endif // _LIBCPP___FILESYSTEM_OPERATIONS_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/path.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/path.h
index 4e6912fcf3e..77699c5ae47 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/path.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/path.h
@@ -14,12 +14,18 @@
#include <__algorithm/replace_copy.h>
#include <__availability>
#include <__config>
+#include <__functional/hash.h>
+#include <__functional/unary_function.h>
+#include <__fwd/hash.h>
#include <__iterator/back_insert_iterator.h>
#include <__iterator/iterator_traits.h>
+#include <__type_traits/decay.h>
+#include <__type_traits/is_pointer.h>
+#include <__type_traits/remove_const.h>
+#include <__type_traits/remove_pointer.h>
#include <cstddef>
#include <string>
#include <string_view>
-#include <type_traits>
#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
# include <iomanip> // for quoted
@@ -34,7 +40,7 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
template <class _Tp>
struct __can_convert_char {
@@ -139,7 +145,7 @@ struct __is_pathable_string<
}
};
-template <class _Source, class _DS = typename decay<_Source>::type,
+template <class _Source, class _DS = __decay_t<_Source>,
class _UnqualPtrType =
__remove_const_t<__remove_pointer_t<_DS> >,
bool _IsCharPtr = is_pointer<_DS>::value&&
@@ -168,7 +174,7 @@ struct __is_pathable_char_array<_Source, _ECharT*, _UPtr, true>
static _ECharT __first_or_null(const _ECharT* __b) { return *__b; }
};
-template <class _Iter, bool _IsIt = __is_cpp17_input_iterator<_Iter>::value,
+template <class _Iter, bool _IsIt = __has_input_iterator_category<_Iter>::value,
class = void>
struct __is_pathable_iter : false_type {};
@@ -217,10 +223,8 @@ typedef char __path_value;
#endif
#if defined(_LIBCPP_WIN32API)
-_LIBCPP_FUNC_VIS
-size_t __wide_to_char(const wstring&, char*, size_t);
-_LIBCPP_FUNC_VIS
-size_t __char_to_wide(const string&, wchar_t*, size_t);
+_LIBCPP_EXPORTED_FROM_ABI size_t __wide_to_char(const wstring&, char*, size_t);
+_LIBCPP_EXPORTED_FROM_ABI size_t __char_to_wide(const string&, wchar_t*, size_t);
#endif
template <class _ECharT>
@@ -303,7 +307,7 @@ struct _PathCVT<__path_value> {
template <class _Iter>
_LIBCPP_HIDE_FROM_ABI
- static typename enable_if<__is_exactly_cpp17_input_iterator<_Iter>::value>::type
+ static typename enable_if<__has_exactly_input_iterator_category<_Iter>::value>::type
__append_range(__path_string& __dest, _Iter __b, _Iter __e) {
for (; __b != __e; ++__b)
__dest.push_back(*__b);
@@ -311,7 +315,7 @@ struct _PathCVT<__path_value> {
template <class _Iter>
_LIBCPP_HIDE_FROM_ABI
- static typename enable_if<__is_cpp17_forward_iterator<_Iter>::value>::type
+ static typename enable_if<__has_forward_iterator_category<_Iter>::value>::type
__append_range(__path_string& __dest, _Iter __b, _Iter __e) {
__dest.append(__b, __e);
}
@@ -348,7 +352,7 @@ struct _PathCVT<char> {
template <class _Iter>
_LIBCPP_HIDE_FROM_ABI
- static typename enable_if<__is_exactly_cpp17_input_iterator<_Iter>::value>::type
+ static typename enable_if<__has_exactly_input_iterator_category<_Iter>::value>::type
__append_range(__path_string& __dest, _Iter __b, _Iter __e) {
basic_string<char> __tmp(__b, __e);
__append_string(__dest, __tmp);
@@ -356,7 +360,7 @@ struct _PathCVT<char> {
template <class _Iter>
_LIBCPP_HIDE_FROM_ABI
- static typename enable_if<__is_cpp17_forward_iterator<_Iter>::value>::type
+ static typename enable_if<__has_forward_iterator_category<_Iter>::value>::type
__append_range(__path_string& __dest, _Iter __b, _Iter __e) {
basic_string<char> __tmp(__b, __e);
__append_string(__dest, __tmp);
@@ -439,7 +443,7 @@ struct _PathExport<char8_t> {
#endif /* !_LIBCPP_HAS_NO_CHAR8_T */
#endif /* _LIBCPP_WIN32API */
-class _LIBCPP_TYPE_VIS path {
+class _LIBCPP_EXPORTED_FROM_ABI path {
template <class _SourceOrIter, class _Tp = path&>
using _EnableIfPathable =
typename enable_if<__is_pathable<_SourceOrIter>::value, _Tp>::type;
@@ -1029,7 +1033,7 @@ public:
}
// iterators
- class _LIBCPP_TYPE_VIS iterator;
+ class _LIBCPP_EXPORTED_FROM_ABI iterator;
typedef iterator const_iterator;
iterator begin() const;
@@ -1079,13 +1083,23 @@ inline _LIBCPP_HIDE_FROM_ABI void swap(path& __lhs, path& __rhs) noexcept {
__lhs.swap(__rhs);
}
-_LIBCPP_FUNC_VIS
-size_t hash_value(const path& __p) noexcept;
+_LIBCPP_EXPORTED_FROM_ABI size_t hash_value(const path& __p) noexcept;
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
_LIBCPP_END_NAMESPACE_FILESYSTEM
+_LIBCPP_BEGIN_NAMESPACE_STD
+
+template <>
+struct _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY hash<_VSTD_FS::path> : __unary_function<_VSTD_FS::path, size_t> {
+ _LIBCPP_HIDE_FROM_ABI size_t operator()(_VSTD_FS::path const& __p) const noexcept {
+ return _VSTD_FS::hash_value(__p);
+ }
+};
+
+_LIBCPP_END_NAMESPACE_STD
+
#endif // _LIBCPP_CXX03_LANG
#endif // _LIBCPP___FILESYSTEM_PATH_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/path_iterator.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/path_iterator.h
index 6f2baf8f7a2..9961b46cf81 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/path_iterator.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/path_iterator.h
@@ -27,9 +27,7 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
-
-class _LIBCPP_TYPE_VIS path::iterator {
+class _LIBCPP_EXPORTED_FROM_ABI path::iterator {
public:
enum _ParserState : unsigned char {
_Singular,
@@ -56,10 +54,10 @@ public:
: __stashed_elem_(), __path_ptr_(nullptr), __entry_(),
__state_(_Singular) {}
- iterator(const iterator&) = default;
- ~iterator() = default;
+ _LIBCPP_HIDE_FROM_ABI iterator(const iterator&) = default;
+ _LIBCPP_HIDE_FROM_ABI ~iterator() = default;
- iterator& operator=(const iterator&) = default;
+ _LIBCPP_HIDE_FROM_ABI iterator& operator=(const iterator&) = default;
_LIBCPP_INLINE_VISIBILITY
reference operator*() const { return __stashed_elem_; }
@@ -69,10 +67,10 @@ public:
_LIBCPP_INLINE_VISIBILITY
iterator& operator++() {
- _LIBCPP_ASSERT(__state_ != _Singular,
- "attempting to increment a singular iterator");
- _LIBCPP_ASSERT(__state_ != _AtEnd,
- "attempting to increment the end iterator");
+ _LIBCPP_ASSERT_UNCATEGORIZED(__state_ != _Singular,
+ "attempting to increment a singular iterator");
+ _LIBCPP_ASSERT_UNCATEGORIZED(__state_ != _AtEnd,
+ "attempting to increment the end iterator");
return __increment();
}
@@ -85,10 +83,10 @@ public:
_LIBCPP_INLINE_VISIBILITY
iterator& operator--() {
- _LIBCPP_ASSERT(__state_ != _Singular,
- "attempting to decrement a singular iterator");
- _LIBCPP_ASSERT(__entry_.data() != __path_ptr_->native().data(),
- "attempting to decrement the begin iterator");
+ _LIBCPP_ASSERT_UNCATEGORIZED(__state_ != _Singular,
+ "attempting to decrement a singular iterator");
+ _LIBCPP_ASSERT_UNCATEGORIZED(__entry_.data() != __path_ptr_->native().data(),
+ "attempting to decrement the begin iterator");
return __decrement();
}
@@ -114,19 +112,19 @@ private:
_ParserState __state_;
};
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY
inline _LIBCPP_INLINE_VISIBILITY bool operator==(const path::iterator& __lhs,
const path::iterator& __rhs) {
return __lhs.__path_ptr_ == __rhs.__path_ptr_ &&
__lhs.__entry_.data() == __rhs.__entry_.data();
}
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY
inline _LIBCPP_INLINE_VISIBILITY bool operator!=(const path::iterator& __lhs,
const path::iterator& __rhs) {
return !(__lhs == __rhs);
}
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
-
_LIBCPP_END_NAMESPACE_FILESYSTEM
#endif // _LIBCPP_CXX03_LANG
diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/perm_options.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/perm_options.h
index 4aba302edfb..e77af9ef97e 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/perm_options.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/perm_options.h
@@ -21,8 +21,6 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
-
enum class _LIBCPP_ENUM_VIS perm_options : unsigned char {
replace = 1,
add = 2,
@@ -68,8 +66,6 @@ inline perm_options& operator^=(perm_options& __lhs, perm_options __rhs) {
return __lhs = __lhs ^ __rhs;
}
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
-
_LIBCPP_END_NAMESPACE_FILESYSTEM
#endif // _LIBCPP_CXX03_LANG
diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/perms.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/perms.h
index df4590057ee..77bc6521034 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/perms.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/perms.h
@@ -21,8 +21,6 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
-
// On Windows, these permission bits map to one single readonly flag per
// file, and the executable bit is always returned as set. When setting
// permissions, as long as the write bit is set for either owner, group or
@@ -86,8 +84,6 @@ inline perms& operator|=(perms& __lhs, perms __rhs) { return __lhs = __lhs | __r
_LIBCPP_INLINE_VISIBILITY
inline perms& operator^=(perms& __lhs, perms __rhs) { return __lhs = __lhs ^ __rhs; }
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
-
_LIBCPP_END_NAMESPACE_FILESYSTEM
#endif // _LIBCPP_CXX03_LANG
diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/recursive_directory_iterator.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/recursive_directory_iterator.h
index b20d201f583..c38d58e5021 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/recursive_directory_iterator.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/recursive_directory_iterator.h
@@ -15,22 +15,24 @@
#include <__filesystem/directory_entry.h>
#include <__filesystem/directory_options.h>
#include <__filesystem/path.h>
+#include <__iterator/default_sentinel.h>
#include <__iterator/iterator_traits.h>
#include <__memory/shared_ptr.h>
#include <__ranges/enable_borrowed_range.h>
#include <__ranges/enable_view.h>
+#include <__system_error/error_code.h>
+#include <__utility/move.h>
#include <cstddef>
-#include <system_error>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
-#ifndef _LIBCPP_CXX03_LANG
+#if !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
class recursive_directory_iterator {
public:
@@ -59,10 +61,10 @@ public:
recursive_directory_iterator(const path& __p, error_code& __ec)
: recursive_directory_iterator(__p, directory_options::none, &__ec) {}
- recursive_directory_iterator(const recursive_directory_iterator&) = default;
- recursive_directory_iterator(recursive_directory_iterator&&) = default;
+ _LIBCPP_HIDE_FROM_ABI recursive_directory_iterator(const recursive_directory_iterator&) = default;
+ _LIBCPP_HIDE_FROM_ABI recursive_directory_iterator(recursive_directory_iterator&&) = default;
- recursive_directory_iterator&
+ _LIBCPP_HIDE_FROM_ABI recursive_directory_iterator&
operator=(const recursive_directory_iterator&) = default;
_LIBCPP_INLINE_VISIBILITY
@@ -76,7 +78,7 @@ public:
return *this;
}
- ~recursive_directory_iterator() = default;
+ _LIBCPP_HIDE_FROM_ABI ~recursive_directory_iterator() = default;
_LIBCPP_INLINE_VISIBILITY
const directory_entry& operator*() const { return __dereference(); }
@@ -84,7 +86,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
const directory_entry* operator->() const { return &__dereference(); }
- recursive_directory_iterator& operator++() { return __increment(); }
+ _LIBCPP_HIDE_FROM_ABI recursive_directory_iterator& operator++() { return __increment(); }
_LIBCPP_INLINE_VISIBILITY
__dir_element_proxy operator++(int) {
@@ -98,8 +100,8 @@ public:
return __increment(&__ec);
}
- _LIBCPP_FUNC_VIS directory_options options() const;
- _LIBCPP_FUNC_VIS int depth() const;
+ _LIBCPP_EXPORTED_FROM_ABI directory_options options() const;
+ _LIBCPP_EXPORTED_FROM_ABI int depth() const;
_LIBCPP_INLINE_VISIBILITY
void pop() { __pop(); }
@@ -113,25 +115,21 @@ public:
_LIBCPP_INLINE_VISIBILITY
void disable_recursion_pending() { __rec_ = false; }
-private:
- _LIBCPP_FUNC_VIS
- recursive_directory_iterator(const path& __p, directory_options __opt,
- error_code* __ec);
-
- _LIBCPP_FUNC_VIS
- const directory_entry& __dereference() const;
+# if _LIBCPP_STD_VER >= 20
- _LIBCPP_FUNC_VIS
- bool __try_recursion(error_code* __ec);
-
- _LIBCPP_FUNC_VIS
- void __advance(error_code* __ec = nullptr);
+ _LIBCPP_HIDE_FROM_ABI bool operator==(default_sentinel_t) const noexcept {
+ return *this == recursive_directory_iterator();
+ }
- _LIBCPP_FUNC_VIS
- recursive_directory_iterator& __increment(error_code* __ec = nullptr);
+# endif
- _LIBCPP_FUNC_VIS
- void __pop(error_code* __ec = nullptr);
+private:
+ _LIBCPP_EXPORTED_FROM_ABI recursive_directory_iterator(const path& __p, directory_options __opt, error_code* __ec);
+ _LIBCPP_EXPORTED_FROM_ABI const directory_entry& __dereference() const;
+ _LIBCPP_EXPORTED_FROM_ABI bool __try_recursion(error_code* __ec);
+ _LIBCPP_EXPORTED_FROM_ABI void __advance(error_code* __ec = nullptr);
+ _LIBCPP_EXPORTED_FROM_ABI recursive_directory_iterator& __increment(error_code* __ec = nullptr);
+ _LIBCPP_EXPORTED_FROM_ABI void __pop(error_code* __ec = nullptr);
inline _LIBCPP_INLINE_VISIBILITY friend bool
operator==(const recursive_directory_iterator&,
@@ -164,22 +162,22 @@ end(recursive_directory_iterator) noexcept {
return recursive_directory_iterator();
}
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
_LIBCPP_END_NAMESPACE_FILESYSTEM
-#if _LIBCPP_STD_VER > 17
+#if _LIBCPP_STD_VER >= 20
template <>
-_LIBCPP_AVAILABILITY_FILESYSTEM
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY
inline constexpr bool _VSTD::ranges::enable_borrowed_range<_VSTD_FS::recursive_directory_iterator> = true;
template <>
-_LIBCPP_AVAILABILITY_FILESYSTEM
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY
inline constexpr bool _VSTD::ranges::enable_view<_VSTD_FS::recursive_directory_iterator> = true;
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCPP_STD_VER >= 20
-#endif // _LIBCPP_CXX03_LANG
+#endif // !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
#endif // _LIBCPP___FILESYSTEM_RECURSIVE_DIRECTORY_ITERATOR_H
diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/space_info.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/space_info.h
index d0747e35ebf..929f5146642 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/space_info.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/space_info.h
@@ -22,20 +22,16 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
-
-struct _LIBCPP_TYPE_VIS space_info {
+struct _LIBCPP_EXPORTED_FROM_ABI space_info {
uintmax_t capacity;
uintmax_t free;
uintmax_t available;
-# if _LIBCPP_STD_VER > 17
+# if _LIBCPP_STD_VER >= 20
friend _LIBCPP_HIDE_FROM_ABI bool operator==(const space_info&, const space_info&) = default;
# endif
};
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
-
_LIBCPP_END_NAMESPACE_FILESYSTEM
#endif // _LIBCPP_CXX03_LANG
diff --git a/contrib/libs/cxxsupp/libcxx/include/__filesystem/u8path.h b/contrib/libs/cxxsupp/libcxx/include/__filesystem/u8path.h
index d35faa14bb8..90b879aec28 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__filesystem/u8path.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__filesystem/u8path.h
@@ -15,7 +15,6 @@
#include <__config>
#include <__filesystem/path.h>
#include <string>
-#include <type_traits>
// Only required on Windows for __widen_from_utf8, and included conservatively
// because it requires support for localization.
@@ -31,7 +30,7 @@
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
template <class _InputIt>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_WITH_CHAR8_T
@@ -99,7 +98,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_WITH_CHAR8_T
#endif
}
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
_LIBCPP_END_NAMESPACE_FILESYSTEM