[libcxx-commits] [libcxx] e9748a7 - [libc++] Workaround broken support for C++17 in GCC 5

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jul 22 12:39:22 PDT 2020


Author: Louis Dionne
Date: 2020-07-22T15:38:58-04:00
New Revision: e9748a7255df1f45175a391d90803e84f62b3c12

URL: https://github.com/llvm/llvm-project/commit/e9748a7255df1f45175a391d90803e84f62b3c12
DIFF: https://github.com/llvm/llvm-project/commit/e9748a7255df1f45175a391d90803e84f62b3c12.diff

LOG: [libc++] Workaround broken support for C++17 in GCC 5

Added: 
    

Modified: 
    libcxx/include/variant

Removed: 
    


################################################################################
diff  --git a/libcxx/include/variant b/libcxx/include/variant
index 03557239a69e..5ea2cbdae744 100644
--- a/libcxx/include/variant
+++ b/libcxx/include/variant
@@ -227,7 +227,10 @@ public:
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 14
+// TODO: GCC 5 lies about its support for C++17 (it says it supports it but it
+//       really doesn't). That breaks variant, which uses some C++17 features.
+//       Remove this once we drop support for GCC 5.
+#if _LIBCPP_STD_VER > 14 && !(_GNUC_VER_NEW < 6000)
 
 _LIBCPP_NORETURN
 inline _LIBCPP_INLINE_VISIBILITY


        


More information about the libcxx-commits mailing list