`is_error_condition_enum_v` and `is_error_code_enum_v` are currently of
type `size_t`, but the standard mandates they are of type `bool`.
This is an ABI break technically since the size of these variable
templates has changed. Document it as such in the release notes.
Fixes https://bugs.llvm.org/show_bug.cgi?id=50755
Reviewed By: ldionne, Quuxplusone, #libc, var-const
Differential Revision: https://reviews.llvm.org/D112553
exceeds the maximum supported size, as required by the C++ standard.
Previously the type ``std::length_error`` was used.
+ABI Changes
+-----------
+
+- The C++17 variable templates ``is_error_code_enum_v`` and
+ ``is_error_condition_enum_v`` are now of type ``bool`` instead of ``size_t``.
+
Build System Changes
--------------------
: public false_type {};
template <class _Tp>
-inline constexpr size_t is_error_condition_enum_v = is_error_condition_enum<_Tp>::value; // C++17
+inline constexpr bool is_error_condition_enum_v = is_error_condition_enum<_Tp>::value; // C++17
template <class _Tp>
-inline constexpr size_t is_error_code_enum_v = is_error_code_enum<_Tp>::value; // C++17
+inline constexpr bool is_error_code_enum_v = is_error_code_enum<_Tp>::value; // C++17
class error_code
{
#if _LIBCPP_STD_VER > 14
template <class _Tp>
-inline constexpr size_t is_error_code_enum_v = is_error_code_enum<_Tp>::value;
+inline constexpr bool is_error_code_enum_v = is_error_code_enum<_Tp>::value;
#endif
// is_error_condition_enum
#if _LIBCPP_STD_VER > 14
template <class _Tp>
-inline constexpr size_t is_error_condition_enum_v = is_error_condition_enum<_Tp>::value;
+inline constexpr bool is_error_condition_enum_v = is_error_condition_enum<_Tp>::value;
#endif
template <>
static_assert((std::is_error_code_enum<T>::value == Expected), "");
#if TEST_STD_VER > 14
static_assert((std::is_error_code_enum_v<T> == Expected), "");
+ ASSERT_SAME_TYPE(decltype(std::is_error_code_enum_v<T>), const bool);
#endif
}
static_assert((std::is_error_condition_enum<T>::value == Expected), "");
#if TEST_STD_VER > 14
static_assert((std::is_error_condition_enum_v<T> == Expected), "");
+ ASSERT_SAME_TYPE(decltype(std::is_error_condition_enum_v<T>), const bool);
#endif
}