diff options
author | armenqa <armenqa@yandex-team.com> | 2024-01-19 12:23:50 +0300 |
---|---|---|
committer | armenqa <armenqa@yandex-team.com> | 2024-01-19 13:10:03 +0300 |
commit | 2de0149d0151c514b22bca0760b95b26c9b0b578 (patch) | |
tree | 2bfed9f3bce7e643ddf048bb61ce3dc0a714bcc2 /contrib/libs/cxxsupp/libcxx/src/filesystem | |
parent | a8c06d218f12b2406fbce24d194885c5d7b68503 (diff) | |
download | ydb-2de0149d0151c514b22bca0760b95b26c9b0b578.tar.gz |
feat contrib: aiogram 3
Relates: https://st.yandex-team.ru/, https://st.yandex-team.ru/
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/src/filesystem')
-rw-r--r-- | contrib/libs/cxxsupp/libcxx/src/filesystem/filesystem_common.h | 20 | ||||
-rw-r--r-- | contrib/libs/cxxsupp/libcxx/src/filesystem/operations.cpp | 3 |
2 files changed, 12 insertions, 11 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/src/filesystem/filesystem_common.h b/contrib/libs/cxxsupp/libcxx/src/filesystem/filesystem_common.h index 0bd2bbe6f7..0e71569d87 100644 --- a/contrib/libs/cxxsupp/libcxx/src/filesystem/filesystem_common.h +++ b/contrib/libs/cxxsupp/libcxx/src/filesystem/filesystem_common.h @@ -124,7 +124,7 @@ error_code make_windows_error(int err) { template <class T> T error_value(); template <> -_LIBCPP_CONSTEXPR_AFTER_CXX11 void error_value<void>() {} +_LIBCPP_CONSTEXPR_SINCE_CXX14 void error_value<void>() {} template <> bool error_value<bool>() { return false; @@ -140,7 +140,7 @@ uintmax_t error_value<uintmax_t>() { return uintmax_t(-1); } template <> -_LIBCPP_CONSTEXPR_AFTER_CXX11 file_time_type error_value<file_time_type>() { +_LIBCPP_CONSTEXPR_SINCE_CXX14 file_time_type error_value<file_time_type>() { return file_time_type::min(); } template <> @@ -309,7 +309,7 @@ struct time_util_base { .count(); private: - static _LIBCPP_CONSTEXPR_AFTER_CXX11 fs_duration get_min_nsecs() { + static _LIBCPP_CONSTEXPR_SINCE_CXX14 fs_duration get_min_nsecs() { return duration_cast<fs_duration>( fs_nanoseconds(min_nsec_timespec) - duration_cast<fs_nanoseconds>(fs_seconds(1))); @@ -319,7 +319,7 @@ private: FileTimeT::duration::min(), "value doesn't roundtrip"); - static _LIBCPP_CONSTEXPR_AFTER_CXX11 bool check_range() { + static _LIBCPP_CONSTEXPR_SINCE_CXX14 bool check_range() { // This kinda sucks, but it's what happens when we don't have __int128_t. if (sizeof(TimeT) == sizeof(rep)) { typedef duration<long long, ratio<3600 * 24 * 365> > Years; @@ -385,7 +385,7 @@ struct time_util : time_util_base<FileTimeT, TimeT> { public: template <class CType, class ChronoType> - static _LIBCPP_CONSTEXPR_AFTER_CXX11 bool checked_set(CType* out, + static _LIBCPP_CONSTEXPR_SINCE_CXX14 bool checked_set(CType* out, ChronoType time) { using Lim = numeric_limits<CType>; if (time > Lim::max() || time < Lim::min()) @@ -394,7 +394,7 @@ public: return true; } - static _LIBCPP_CONSTEXPR_AFTER_CXX11 bool is_representable(TimeSpecT tm) { + static _LIBCPP_CONSTEXPR_SINCE_CXX14 bool is_representable(TimeSpecT tm) { if (tm.tv_sec >= 0) { return tm.tv_sec < max_seconds || (tm.tv_sec == max_seconds && tm.tv_nsec <= max_nsec); @@ -405,7 +405,7 @@ public: } } - static _LIBCPP_CONSTEXPR_AFTER_CXX11 bool is_representable(FileTimeT tm) { + static _LIBCPP_CONSTEXPR_SINCE_CXX14 bool is_representable(FileTimeT tm) { auto secs = duration_cast<fs_seconds>(tm.time_since_epoch()); auto nsecs = duration_cast<fs_nanoseconds>(tm.time_since_epoch() - secs); if (nsecs.count() < 0) { @@ -418,7 +418,7 @@ public: return secs.count() >= TLim::min(); } - static _LIBCPP_CONSTEXPR_AFTER_CXX11 FileTimeT + static _LIBCPP_CONSTEXPR_SINCE_CXX14 FileTimeT convert_from_timespec(TimeSpecT tm) { if (tm.tv_sec >= 0 || tm.tv_nsec == 0) { return FileTimeT(fs_seconds(tm.tv_sec) + @@ -432,7 +432,7 @@ public: } template <class SubSecT> - static _LIBCPP_CONSTEXPR_AFTER_CXX11 bool + static _LIBCPP_CONSTEXPR_SINCE_CXX14 bool set_times_checked(TimeT* sec_out, SubSecT* subsec_out, FileTimeT tp) { auto dur = tp.time_since_epoch(); auto sec_dur = duration_cast<fs_seconds>(dur); @@ -449,7 +449,7 @@ public: return checked_set(sec_out, sec_dur.count()) && checked_set(subsec_out, subsec_dur.count()); } - static _LIBCPP_CONSTEXPR_AFTER_CXX11 bool convert_to_timespec(TimeSpecT& dest, + static _LIBCPP_CONSTEXPR_SINCE_CXX14 bool convert_to_timespec(TimeSpecT& dest, FileTimeT tp) { if (!is_representable(tp)) return false; diff --git a/contrib/libs/cxxsupp/libcxx/src/filesystem/operations.cpp b/contrib/libs/cxxsupp/libcxx/src/filesystem/operations.cpp index 3c02723046..f9b74120e0 100644 --- a/contrib/libs/cxxsupp/libcxx/src/filesystem/operations.cpp +++ b/contrib/libs/cxxsupp/libcxx/src/filesystem/operations.cpp @@ -1352,7 +1352,7 @@ bool __remove(const path& p, error_code* ec) { // // The second implementation is used on platforms where `openat()` & friends are available, // and it threads file descriptors through recursive calls to avoid such race conditions. -#if defined(_LIBCPP_WIN32API) +#if defined(_LIBCPP_WIN32API) || defined (__MVS__) # define REMOVE_ALL_USE_DIRECTORY_ITERATOR #endif @@ -1412,6 +1412,7 @@ struct scope_exit { private: Cleanup cleanup_; }; +_LIBCPP_CTAD_SUPPORTED_FOR_TYPE(scope_exit); uintmax_t remove_all_impl(int parent_directory, const path& p, error_code& ec) { // First, try to open the path as a directory. |