From 06ee65af9ed6aa5ee4d1d7f4fab9d7acecf66e76 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 26 Apr 2024 15:33:29 -0700 Subject: libcxx: update to LLVM 18 release/18.x branch, commit 78b99c73ee4b96fe9ce0e294d4632326afb2db42 This adds the flag `-D_LIBCPP_HARDENING_MODE` which is determined based on the Zig optimization mode. This commit also fixes libunwind, libcxx, and libcxxabi to properly report sub compilation errors. --- lib/libcxx/include/__system_error/error_code.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'lib/libcxx/include/__system_error/error_code.h') diff --git a/lib/libcxx/include/__system_error/error_code.h b/lib/libcxx/include/__system_error/error_code.h index d05e68529f..475f2bb96a 100644 --- a/lib/libcxx/include/__system_error/error_code.h +++ b/lib/libcxx/include/__system_error/error_code.h @@ -49,9 +49,8 @@ public: _LIBCPP_HIDE_FROM_ABI error_code(int __val, const error_category& __cat) _NOEXCEPT : __val_(__val), __cat_(&__cat) {} - template - _LIBCPP_HIDE_FROM_ABI - error_code(_Ep __e, typename enable_if::value>::type* = nullptr) _NOEXCEPT { + template ::value, int> = 0> + _LIBCPP_HIDE_FROM_ABI error_code(_Ep __e) _NOEXCEPT { using __adl_only::make_error_code; *this = make_error_code(__e); } @@ -61,9 +60,8 @@ public: __cat_ = &__cat; } - template - _LIBCPP_HIDE_FROM_ABI typename enable_if< is_error_code_enum<_Ep>::value, error_code& >::type - operator=(_Ep __e) _NOEXCEPT { + template ::value, int> = 0> + _LIBCPP_HIDE_FROM_ABI error_code& operator=(_Ep __e) _NOEXCEPT { using __adl_only::make_error_code; *this = make_error_code(__e); return *this; -- cgit v1.2.3