From c31d5a4ef3ad88d53d2ab036f010d35235107303 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Wed, 14 Aug 2019 17:04:31 +0000 Subject: [PATCH] [libc++] Enable ""d and ""y literals for AppleClang 10 and up AppleClang supports those literals starting in version 10.0.1. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@368882 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/__config | 7 ++++--- .../time.cal.day/time.cal.day.nonmembers/literals.pass.cpp | 2 +- .../time.cal.year.nonmembers/literals.pass.cpp | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/include/__config b/include/__config index f1b739070..0d9d72377 100644 --- a/include/__config +++ b/include/__config @@ -479,9 +479,10 @@ typedef __char32_t char32_t; #define _LIBCPP_ALWAYS_INLINE __attribute__ ((__always_inline__)) -// No apple compilers support ""d and ""y at this time. -#if (defined(_LIBCPP_CLANG_VER) && _LIBCPP_CLANG_VER < 800) || defined(__apple_build_version__) -#define _LIBCPP_HAS_NO_CXX20_CHRONO_LITERALS +// Literal operators ""d and ""y are supported starting with LLVM Clang 8 and AppleClang 10.0.1 +#if (defined(_LIBCPP_CLANG_VER) && _LIBCPP_CLANG_VER < 800) || \ + (defined(__apple_build_version__) && __apple_build_version__ < 10010000) +#define _LIBCPP_HAS_NO_CXX20_CHRONO_LITERALS #endif #elif defined(_LIBCPP_COMPILER_GCC) diff --git a/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/literals.pass.cpp b/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/literals.pass.cpp index bb0cba13f..946e742e7 100644 --- a/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/literals.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.day/time.cal.day.nonmembers/literals.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-5, clang-6, clang-7 -// UNSUPPORTED: apple-clang-6, apple-clang-7, apple-clang-8, apple-clang-9, apple-clang-10, apple-clang-11 +// UNSUPPORTED: apple-clang-6, apple-clang-7, apple-clang-8, apple-clang-9 // // class day; diff --git a/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/literals.pass.cpp b/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/literals.pass.cpp index 4230034db..abc3dcddf 100644 --- a/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/literals.pass.cpp +++ b/test/std/utilities/time/time.cal/time.cal.year/time.cal.year.nonmembers/literals.pass.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// // UNSUPPORTED: c++98, c++03, c++11, c++14, c++17 // UNSUPPORTED: clang-5, clang-6, clang-7 -// UNSUPPORTED: apple-clang-6, apple-clang-7, apple-clang-8, apple-clang-9, apple-clang-10, apple-clang-11 +// UNSUPPORTED: apple-clang-6, apple-clang-7, apple-clang-8, apple-clang-9 // // class year;