[libcxx-commits] [libcxx] f8772da - [libc++][format] Enable format_error on older compilers.

Mark de Wever via libcxx-commits libcxx-commits at lists.llvm.org
Thu Feb 11 10:14:17 PST 2021


Author: Mark de Wever
Date: 2021-02-11T19:11:20+01:00
New Revision: f8772da8cc9a0be65c9ba028c2b5a895c1ed4f91

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

LOG: [libc++][format] Enable format_error on older compilers.

It seems like modifying the header doesn't cause libc++ to be rebuild.
So the breakage of the previous commit didn't happen on my system.

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 8c92984b7b26..25398ad6a7c4 100644
--- a/libcxx/include/format
+++ b/libcxx/include/format
@@ -75,12 +75,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 #if _LIBCPP_STD_VER > 17
 
-// TODO FMT Remove this once we require compilers with proper C++20 support.
-// 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.
-#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_BUILTIN_IS_CONSTANT_EVALUATED)
-
 class _LIBCPP_EXCEPTION_ABI format_error : public runtime_error {
 public:
   _LIBCPP_INLINE_VISIBILITY explicit format_error(const string& __s)
@@ -90,6 +84,12 @@ public:
   virtual ~format_error() noexcept;
 };
 
+// TODO FMT Remove this once we require compilers with proper C++20 support.
+// 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.
+#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_BUILTIN_IS_CONSTANT_EVALUATED)
+
 _LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY void
 __throw_format_error(const char* __s) {
 #ifndef _LIBCPP_NO_EXCEPTIONS


        


More information about the libcxx-commits mailing list