diff options
Diffstat (limited to 'libcxx/include')
| -rw-r--r-- | libcxx/include/__config | 5 | ||||
| -rw-r--r-- | libcxx/include/chrono | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/libcxx/include/__config b/libcxx/include/__config index 14ecb8fb426..7e47f44790c 100644 --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -492,6 +492,11 @@ namespace std { #define _LIBCPP_ALWAYS_INLINE __attribute__ ((__always_inline__)) +// No apple compilers support ""d and ""y at this time. +#if _LIBCPP_CLANG_VER < 800 || defined(__apple_build_version__) +#define _LIBCPP_HAS_NO_CXX20_CHRONO_LITERALS +#endif + #elif defined(_LIBCPP_COMPILER_GCC) #define _ALIGNAS(x) __attribute__((__aligned__(x))) diff --git a/libcxx/include/chrono b/libcxx/include/chrono index 1812df8f495..75258abd26b 100644 --- a/libcxx/include/chrono +++ b/libcxx/include/chrono @@ -2668,7 +2668,7 @@ inline namespace literals return chrono::duration<long double, nano> (__ns); } -#if _LIBCPP_STD_VER > 17 +#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CXX20_CHRONO_LITERALS) constexpr chrono::day operator ""d(unsigned long long __d) noexcept { return chrono::day(static_cast<unsigned>(__d)); |

