Wrap up the new chrono literals in an #ifdef so that old versions of clang don't complain. I'm looking at you, clang 5.0.1

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@344535 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2018-10-15 17:33:20 +00:00
parent fc25eebcac
commit 1b8e200470
4 changed files with 10 additions and 1 deletions

View File

@@ -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));