summaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/src/filesystem
diff options
context:
space:
mode:
authormikhnenko <[email protected]>2024-03-27 10:35:27 +0300
committermikhnenko <[email protected]>2024-03-27 10:47:39 +0300
commit9b902baa4a858f2176c82aa0b20f88232f0da0d8 (patch)
tree7165a551c2244c4b3c28479ac3a3f6d62346ec89 /contrib/libs/cxxsupp/libcxx/src/filesystem
parenta1c989e67e438005fa0c34ed0e910536c8941862 (diff)
Update libcxx to 10 Oct 2023 dc129d6f715cf83a2072fc8de8b4e4c70bca6935
97ce40d276e44357a49b7a945af841896126dca8
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/src/filesystem')
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/filesystem/error.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/filesystem/posix_compat.h4
-rw-r--r--contrib/libs/cxxsupp/libcxx/src/filesystem/time_utils.h16
3 files changed, 12 insertions, 12 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/src/filesystem/error.h b/contrib/libs/cxxsupp/libcxx/src/filesystem/error.h
index 965e0eadcd0..93da7587615 100644
--- a/contrib/libs/cxxsupp/libcxx/src/filesystem/error.h
+++ b/contrib/libs/cxxsupp/libcxx/src/filesystem/error.h
@@ -112,7 +112,7 @@ inline error_code make_windows_error(int err) {
template <class T>
T error_value();
template <>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX14 void error_value<void>() {}
+inline constexpr void error_value<void>() {}
template <>
inline bool error_value<bool>() {
return false;
@@ -128,7 +128,7 @@ inline uintmax_t error_value<uintmax_t>() {
return uintmax_t(-1);
}
template <>
-inline _LIBCPP_CONSTEXPR_SINCE_CXX14 file_time_type error_value<file_time_type>() {
+inline constexpr file_time_type error_value<file_time_type>() {
return file_time_type::min();
}
template <>
diff --git a/contrib/libs/cxxsupp/libcxx/src/filesystem/posix_compat.h b/contrib/libs/cxxsupp/libcxx/src/filesystem/posix_compat.h
index f11f41552e3..fb213d9ec18 100644
--- a/contrib/libs/cxxsupp/libcxx/src/filesystem/posix_compat.h
+++ b/contrib/libs/cxxsupp/libcxx/src/filesystem/posix_compat.h
@@ -322,8 +322,8 @@ inline int statvfs(const wchar_t *p, StatVFS *buf) {
inline wchar_t* getcwd([[maybe_unused]] wchar_t* in_buf, [[maybe_unused]] size_t in_size) {
// Only expected to be used with us allocating the buffer.
- _LIBCPP_ASSERT(in_buf == nullptr, "Windows getcwd() assumes in_buf==nullptr");
- _LIBCPP_ASSERT(in_size == 0, "Windows getcwd() assumes in_size==0");
+ _LIBCPP_ASSERT_UNCATEGORIZED(in_buf == nullptr, "Windows getcwd() assumes in_buf==nullptr");
+ _LIBCPP_ASSERT_UNCATEGORIZED(in_size == 0, "Windows getcwd() assumes in_size==0");
size_t buff_size = MAX_PATH + 10;
std::unique_ptr<wchar_t, decltype(&::free)> buff(static_cast<wchar_t*>(malloc(buff_size * sizeof(wchar_t))), &::free);
diff --git a/contrib/libs/cxxsupp/libcxx/src/filesystem/time_utils.h b/contrib/libs/cxxsupp/libcxx/src/filesystem/time_utils.h
index 9177e1013d0..eb417693685 100644
--- a/contrib/libs/cxxsupp/libcxx/src/filesystem/time_utils.h
+++ b/contrib/libs/cxxsupp/libcxx/src/filesystem/time_utils.h
@@ -147,7 +147,7 @@ struct time_util_base {
.count();
private:
- static _LIBCPP_CONSTEXPR fs_duration get_min_nsecs() {
+ static constexpr fs_duration get_min_nsecs() {
return duration_cast<fs_duration>(
fs_nanoseconds(min_nsec_timespec) -
duration_cast<fs_nanoseconds>(fs_seconds(1)));
@@ -157,7 +157,7 @@ private:
FileTimeT::duration::min(),
"value doesn't roundtrip");
- static _LIBCPP_CONSTEXPR_SINCE_CXX14 bool check_range() {
+ static constexpr 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;
@@ -225,7 +225,7 @@ struct time_util : time_util_base<FileTimeT, TimeT> {
public:
template <class CType, class ChronoType>
- static _LIBCPP_CONSTEXPR_SINCE_CXX14 bool checked_set(CType* out,
+ static constexpr bool checked_set(CType* out,
ChronoType time) {
using Lim = numeric_limits<CType>;
if (time > Lim::max() || time < Lim::min())
@@ -234,7 +234,7 @@ public:
return true;
}
- static _LIBCPP_CONSTEXPR_SINCE_CXX14 bool is_representable(TimeSpecT tm) {
+ static constexpr 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);
@@ -245,7 +245,7 @@ public:
}
}
- static _LIBCPP_CONSTEXPR_SINCE_CXX14 bool is_representable(FileTimeT tm) {
+ static constexpr 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) {
@@ -258,7 +258,7 @@ public:
return secs.count() >= TLim::min();
}
- static _LIBCPP_CONSTEXPR_SINCE_CXX14 FileTimeT
+ static constexpr FileTimeT
convert_from_timespec(TimeSpecT tm) {
if (tm.tv_sec >= 0 || tm.tv_nsec == 0) {
return FileTimeT(fs_seconds(tm.tv_sec) +
@@ -272,7 +272,7 @@ public:
}
template <class SubSecT>
- static _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
+ static constexpr 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);
@@ -289,7 +289,7 @@ public:
return checked_set(sec_out, sec_dur.count()) &&
checked_set(subsec_out, subsec_dur.count());
}
- static _LIBCPP_CONSTEXPR_SINCE_CXX14 bool convert_to_timespec(TimeSpecT& dest,
+ static constexpr bool convert_to_timespec(TimeSpecT& dest,
FileTimeT tp) {
if (!is_representable(tp))
return false;