From e9748a7255df1f45175a391d90803e84f62b3c12 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Wed, 22 Jul 2020 15:24:16 -0400 Subject: [PATCH] [libc++] Workaround broken support for C++17 in GCC 5 --- libcxx/include/variant | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libcxx/include/variant b/libcxx/include/variant index 0355723..5ea2cbd 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 -- 2.7.4