Skip to content

Commit f8772da

Browse files
committed
[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
1 parent 204360f commit f8772da

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

libcxx/include/format

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
7575

7676
#if _LIBCPP_STD_VER > 17
7777

78-
// TODO FMT Remove this once we require compilers with proper C++20 support.
79-
// If the compiler has no concepts support, the format header will be disabled.
80-
// Without concepts support enable_if needs to be used and that too much effort
81-
// to support compilers with partial C++20 support.
82-
#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_BUILTIN_IS_CONSTANT_EVALUATED)
83-
8478
class _LIBCPP_EXCEPTION_ABI format_error : public runtime_error {
8579
public:
8680
_LIBCPP_INLINE_VISIBILITY explicit format_error(const string& __s)
@@ -90,6 +84,12 @@ public:
9084
virtual ~format_error() noexcept;
9185
};
9286

87+
// TODO FMT Remove this once we require compilers with proper C++20 support.
88+
// If the compiler has no concepts support, the format header will be disabled.
89+
// Without concepts support enable_if needs to be used and that too much effort
90+
// to support compilers with partial C++20 support.
91+
#if !defined(_LIBCPP_HAS_NO_CONCEPTS) && !defined(_LIBCPP_HAS_NO_BUILTIN_IS_CONSTANT_EVALUATED)
92+
9393
_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY void
9494
__throw_format_error(const char* __s) {
9595
#ifndef _LIBCPP_NO_EXCEPTIONS

0 commit comments

Comments
 (0)