diff --git a/libcxx/src/experimental/memory_resource.cpp b/libcxx/src/experimental/memory_resource.cpp --- a/libcxx/src/experimental/memory_resource.cpp +++ b/libcxx/src/experimental/memory_resource.cpp @@ -76,12 +76,7 @@ ~ResourceInitHelper() {} }; -// When compiled in C++14 this initialization should be a constant expression. -// Only in C++11 is "init_priority" needed to ensure initialization order. -#if _LIBCPP_STD_VER > 11 -_LIBCPP_SAFE_STATIC -#endif -ResourceInitHelper res_init _LIBCPP_INIT_PRIORITY_MAX; +_LIBCPP_SAFE_STATIC ResourceInitHelper res_init _LIBCPP_INIT_PRIORITY_MAX; } // end namespace diff --git a/libcxx/src/filesystem/filesystem_common.h b/libcxx/src/filesystem/filesystem_common.h --- a/libcxx/src/filesystem/filesystem_common.h +++ b/libcxx/src/filesystem/filesystem_common.h @@ -287,8 +287,7 @@ .count(); private: -#if _LIBCPP_STD_VER > 11 && !defined(_LIBCPP_HAS_NO_CXX14_CONSTEXPR) - static constexpr fs_duration get_min_nsecs() { + static _LIBCPP_CONSTEXPR_AFTER_CXX11 fs_duration get_min_nsecs() { return duration_cast( fs_nanoseconds(min_nsec_timespec) - duration_cast(fs_seconds(1))); @@ -298,7 +297,7 @@ FileTimeT::duration::min(), "value doesn't roundtrip"); - static constexpr bool check_range() { + static _LIBCPP_CONSTEXPR_AFTER_CXX11 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 > Years; @@ -309,7 +308,6 @@ min_seconds <= numeric_limits::min(); } static_assert(check_range(), "the representable range is unacceptable small"); -#endif }; template