[libcxx-commits] [libcxx] af83e89 - [libc++][format] Improve Add basic_format_parse_context.
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Feb 11 09:56:06 PST 2021
Author: Mark de Wever
Date: 2021-02-11T18:55:54+01:00
New Revision: af83e89ae303a2bc54d94164b5ea05fa47a8f9e1
URL: https://github.com/llvm/llvm-project/commit/af83e89ae303a2bc54d94164b5ea05fa47a8f9e1
DIFF: https://github.com/llvm/llvm-project/commit/af83e89ae303a2bc54d94164b5ea05fa47a8f9e1.diff
LOG: [libc++][format] Improve Add basic_format_parse_context.
Add an additional guard to prevent building on older clang versions.
This should fix the build of https://buildkite.com/mlir/mlir-core
Added:
Modified:
libcxx/include/format
Removed:
################################################################################
diff --git a/libcxx/include/format b/libcxx/include/format
index 9e41120846ef..8c92984b7b26 100644
--- a/libcxx/include/format
+++ b/libcxx/include/format
@@ -79,7 +79,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// If the compiler has no concepts support, the format header will be disabled.
// Without concepts support enable_if needs to be used and that too much effort
// to support compilers with partial C++20 support.
-#ifndef _LIBCPP_HAS_NO_CONCEPTS
+#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_BUILTIN_IS_CONSTANT_EVALUATED)
class _LIBCPP_EXCEPTION_ABI format_error : public runtime_error {
public:
@@ -172,7 +172,7 @@ private:
using format_parse_context = basic_format_parse_context<char>;
using wformat_parse_context = basic_format_parse_context<wchar_t>;
-#endif //_LIBCPP_HAS_NO_CONCEPTS
+#endif // !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_BUILTIN_IS_CONSTANT_EVALUATED)
#endif //_LIBCPP_STD_VER > 17
_LIBCPP_END_NAMESPACE_STD
More information about the libcxx-commits
mailing list