Skip to content

[libc++][NFC] Remove unnecessary parens in static_asserts #95605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libcxx/include/__atomic/memory_order.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ enum class memory_order : __memory_order_underlying_t {
seq_cst = __mo_seq_cst
};

static_assert((is_same<underlying_type<memory_order>::type, __memory_order_underlying_t>::value),
static_assert(is_same<underlying_type<memory_order>::type, __memory_order_underlying_t>::value,
"unexpected underlying type for std::memory_order");

inline constexpr auto memory_order_relaxed = memory_order::relaxed;
Expand Down
14 changes: 7 additions & 7 deletions libcxx/include/__hash_table
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,9 @@ public:

private:
static_assert(!is_const<__node_type>::value, "_NodePtr should never be a pointer to const");
static_assert((is_same<typename pointer_traits<_VoidPtr>::element_type, void>::value),
static_assert(is_same<typename pointer_traits<_VoidPtr>::element_type, void>::value,
"_VoidPtr does not point to unqualified void type");
static_assert((is_same<__rebind_pointer_t<_VoidPtr, __node_type>, _NodePtr>::value),
static_assert(is_same<__rebind_pointer_t<_VoidPtr, __node_type>, _NodePtr>::value,
"_VoidPtr does not rebind to _NodePtr.");
};

Expand Down Expand Up @@ -700,11 +700,11 @@ private:
// check for sane allocator pointer rebinding semantics. Rebinding the
// allocator for a new pointer type should be exactly the same as rebinding
// the pointer using 'pointer_traits'.
static_assert((is_same<__node_pointer, typename __node_traits::pointer>::value),
static_assert(is_same<__node_pointer, typename __node_traits::pointer>::value,
"Allocator does not rebind pointers in a sane manner.");
typedef __rebind_alloc<__node_traits, __first_node> __node_base_allocator;
typedef allocator_traits<__node_base_allocator> __node_base_traits;
static_assert((is_same<__node_base_pointer, typename __node_base_traits::pointer>::value),
static_assert(is_same<__node_base_pointer, typename __node_base_traits::pointer>::value,
"Allocator does not rebind pointers in a sane manner.");

private:
Expand Down Expand Up @@ -1101,8 +1101,8 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u, const
template <class _Tp, class _Hash, class _Equal, class _Alloc>
__hash_table<_Tp, _Hash, _Equal, _Alloc>::~__hash_table() {
#if defined(_LIBCPP_CXX03_LANG)
static_assert((is_copy_constructible<key_equal>::value), "Predicate must be copy-constructible.");
static_assert((is_copy_constructible<hasher>::value), "Hasher must be copy-constructible.");
static_assert(is_copy_constructible<key_equal>::value, "Predicate must be copy-constructible.");
static_assert(is_copy_constructible<hasher>::value, "Hasher must be copy-constructible.");
#endif

__deallocate_node(__p1_.first().__next_);
Expand Down Expand Up @@ -1228,7 +1228,7 @@ template <class _InputIterator>
void __hash_table<_Tp, _Hash, _Equal, _Alloc>::__assign_unique(_InputIterator __first, _InputIterator __last) {
typedef iterator_traits<_InputIterator> _ITraits;
typedef typename _ITraits::value_type _ItValueType;
static_assert((is_same<_ItValueType, __container_value_type>::value),
static_assert(is_same<_ItValueType, __container_value_type>::value,
"__assign_unique may only be called with the containers value type");

if (bucket_count() != 0) {
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__math/exponential_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ inline _LIBCPP_HIDE_FROM_ABI long double pow(long double __x, long double __y) _
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type pow(_A1 __x, _A2 __y) _NOEXCEPT {
using __result_type = typename __promote<_A1, _A2>::type;
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
static_assert(!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value), "");
return __math::pow((__result_type)__x, (__result_type)__y);
}

Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__math/fdim.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ inline _LIBCPP_HIDE_FROM_ABI long double fdim(long double __x, long double __y)
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type fdim(_A1 __x, _A2 __y) _NOEXCEPT {
using __result_type = typename __promote<_A1, _A2>::type;
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
static_assert(!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value), "");
return __math::fdim((__result_type)__x, (__result_type)__y);
}

Expand Down
6 changes: 3 additions & 3 deletions libcxx/include/__math/fma.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ template <class _A1,
__enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value && is_arithmetic<_A3>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2, _A3>::type fma(_A1 __x, _A2 __y, _A3 __z) _NOEXCEPT {
using __result_type = typename __promote<_A1, _A2, _A3>::type;
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value &&
_IsSame<_A3, __result_type>::value)),
"");
static_assert(
!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value && _IsSame<_A3, __result_type>::value),
"");
return __builtin_fma((__result_type)__x, (__result_type)__y, (__result_type)__z);
}

Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__math/hypot.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ inline _LIBCPP_HIDE_FROM_ABI long double hypot(long double __x, long double __y)
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type hypot(_A1 __x, _A2 __y) _NOEXCEPT {
using __result_type = typename __promote<_A1, _A2>::type;
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
static_assert(!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value), "");
return __math::hypot((__result_type)__x, (__result_type)__y);
}

Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__math/inverse_trigonometric_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ inline _LIBCPP_HIDE_FROM_ABI long double atan2(long double __y, long double __x)
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type atan2(_A1 __y, _A2 __x) _NOEXCEPT {
using __result_type = typename __promote<_A1, _A2>::type;
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
static_assert(!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value), "");
return __math::atan2((__result_type)__y, (__result_type)__x);
}

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__math/min_max.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ _LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI long double fmax(long double __x,
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type fmax(_A1 __x, _A2 __y) _NOEXCEPT {
using __result_type = typename __promote<_A1, _A2>::type;
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
static_assert(!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value), "");
return __math::fmax((__result_type)__x, (__result_type)__y);
}

Expand All @@ -63,7 +63,7 @@ _LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI long double fmin(long double __x,
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type fmin(_A1 __x, _A2 __y) _NOEXCEPT {
using __result_type = typename __promote<_A1, _A2>::type;
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
static_assert(!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value), "");
return __math::fmin((__result_type)__x, (__result_type)__y);
}

Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__math/modulo.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ inline _LIBCPP_HIDE_FROM_ABI long double fmod(long double __x, long double __y)
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type fmod(_A1 __x, _A2 __y) _NOEXCEPT {
using __result_type = typename __promote<_A1, _A2>::type;
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
static_assert(!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value), "");
return __math::fmod((__result_type)__x, (__result_type)__y);
}

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__math/remainder.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ inline _LIBCPP_HIDE_FROM_ABI long double remainder(long double __x, long double
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type remainder(_A1 __x, _A2 __y) _NOEXCEPT {
using __result_type = typename __promote<_A1, _A2>::type;
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
static_assert(!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value), "");
return __math::remainder((__result_type)__x, (__result_type)__y);
}

Expand All @@ -62,7 +62,7 @@ inline _LIBCPP_HIDE_FROM_ABI long double remquo(long double __x, long double __y
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type remquo(_A1 __x, _A2 __y, int* __z) _NOEXCEPT {
using __result_type = typename __promote<_A1, _A2>::type;
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
static_assert(!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value), "");
return __math::remquo((__result_type)__x, (__result_type)__y, __z);
}

Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__math/rounding_functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ inline _LIBCPP_HIDE_FROM_ABI long double nextafter(long double __x, long double
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type nextafter(_A1 __x, _A2 __y) _NOEXCEPT {
using __result_type = typename __promote<_A1, _A2>::type;
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
static_assert(!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value), "");
return __math::nextafter((__result_type)__x, (__result_type)__y);
}

Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__mdspan/extents.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ struct __maybe_static_array {
template <class... _DynVals>
requires(sizeof...(_DynVals) != __size_dynamic_)
_LIBCPP_HIDE_FROM_ABI constexpr __maybe_static_array(_DynVals... __vals) {
static_assert((sizeof...(_DynVals) == __size_), "Invalid number of values.");
static_assert(sizeof...(_DynVals) == __size_, "Invalid number of values.");
_TDynamic __values[__size_] = {static_cast<_TDynamic>(__vals)...};
for (size_t __i = 0; __i < __size_; __i++) {
_TStatic __static_val = _StaticValues::__get(__i);
Expand All @@ -185,7 +185,7 @@ struct __maybe_static_array {
template <class _Tp, size_t _Size>
requires(_Size != __size_dynamic_)
_LIBCPP_HIDE_FROM_ABI constexpr __maybe_static_array(const span<_Tp, _Size>& __vals) {
static_assert((_Size == __size_) || (__size_ == dynamic_extent));
static_assert(_Size == __size_ || __size_ == dynamic_extent);
for (size_t __i = 0; __i < __size_; __i++) {
_TStatic __static_val = _StaticValues::__get(__i);
if (__static_val == _DynTag) {
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__mdspan/layout_left.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class layout_left::mapping {
return true;
}

static_assert((extents_type::rank_dynamic() > 0) || __required_span_size_is_representable(extents_type()),
static_assert(extents_type::rank_dynamic() > 0 || __required_span_size_is_representable(extents_type()),
"layout_left::mapping product of static extents must be representable as index_type.");

public:
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__mdspan/layout_right.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class layout_right::mapping {
return true;
}

static_assert((extents_type::rank_dynamic() > 0) || __required_span_size_is_representable(extents_type()),
static_assert(extents_type::rank_dynamic() > 0 || __required_span_size_is_representable(extents_type()),
"layout_right::mapping product of static extents must be representable as index_type.");

public:
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__mdspan/layout_stride.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class layout_stride::mapping {
}
}

static_assert((extents_type::rank_dynamic() > 0) || __required_span_size_is_representable(extents_type()),
static_assert(extents_type::rank_dynamic() > 0 || __required_span_size_is_representable(extents_type()),
"layout_stride::mapping product of static extents must be representable as index_type.");

public:
Expand Down
14 changes: 7 additions & 7 deletions libcxx/include/__numeric/gcd_lcm.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct __ct_abs<_Result, _Source, false> {

template <class _Tp>
_LIBCPP_CONSTEXPR _LIBCPP_HIDDEN _Tp __gcd(_Tp __a, _Tp __b) {
static_assert((!is_signed<_Tp>::value), "");
static_assert(!is_signed<_Tp>::value, "");

// From: https://lemire.me/blog/2013/12/26/fastest-way-to-compute-the-greatest-common-divisor
//
Expand Down Expand Up @@ -97,9 +97,9 @@ _LIBCPP_CONSTEXPR _LIBCPP_HIDDEN _Tp __gcd(_Tp __a, _Tp __b) {

template <class _Tp, class _Up>
_LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI common_type_t<_Tp, _Up> gcd(_Tp __m, _Up __n) {
static_assert((is_integral<_Tp>::value && is_integral<_Up>::value), "Arguments to gcd must be integer types");
static_assert((!is_same<__remove_cv_t<_Tp>, bool>::value), "First argument to gcd cannot be bool");
static_assert((!is_same<__remove_cv_t<_Up>, bool>::value), "Second argument to gcd cannot be bool");
static_assert(is_integral<_Tp>::value && is_integral<_Up>::value, "Arguments to gcd must be integer types");
static_assert(!is_same<__remove_cv_t<_Tp>, bool>::value, "First argument to gcd cannot be bool");
static_assert(!is_same<__remove_cv_t<_Up>, bool>::value, "Second argument to gcd cannot be bool");
using _Rp = common_type_t<_Tp, _Up>;
using _Wp = make_unsigned_t<_Rp>;
return static_cast<_Rp>(
Expand All @@ -108,9 +108,9 @@ _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI common_type_t<_Tp, _Up> gcd(_Tp __m, _Up

template <class _Tp, class _Up>
_LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI common_type_t<_Tp, _Up> lcm(_Tp __m, _Up __n) {
static_assert((is_integral<_Tp>::value && is_integral<_Up>::value), "Arguments to lcm must be integer types");
static_assert((!is_same<__remove_cv_t<_Tp>, bool>::value), "First argument to lcm cannot be bool");
static_assert((!is_same<__remove_cv_t<_Up>, bool>::value), "Second argument to lcm cannot be bool");
static_assert(is_integral<_Tp>::value && is_integral<_Up>::value, "Arguments to lcm must be integer types");
static_assert(!is_same<__remove_cv_t<_Tp>, bool>::value, "First argument to lcm cannot be bool");
static_assert(!is_same<__remove_cv_t<_Up>, bool>::value, "Second argument to lcm cannot be bool");
if (__m == 0 || __n == 0)
return 0;

Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__thread/thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class __thread_specific_ptr {

// Only __thread_local_data() may construct a __thread_specific_ptr
// and only with _Tp == __thread_struct.
static_assert((is_same<_Tp, __thread_struct>::value), "");
static_assert(is_same<_Tp, __thread_struct>::value, "");
__thread_specific_ptr();
friend _LIBCPP_EXPORTED_FROM_ABI __thread_specific_ptr<__thread_struct>& __thread_local_data();

Expand Down
12 changes: 6 additions & 6 deletions libcxx/include/__tree
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ struct __tree_node_base_types {
#endif

private:
static_assert((is_same<typename pointer_traits<_VoidPtr>::element_type, void>::value),
static_assert(is_same<typename pointer_traits<_VoidPtr>::element_type, void>::value,
"_VoidPtr does not point to unqualified void type");
};

Expand Down Expand Up @@ -614,7 +614,7 @@ public:

private:
static_assert(!is_const<__node_type>::value, "_NodePtr should never be a pointer to const");
static_assert((is_same<__rebind_pointer_t<_VoidPtr, __node_type>, _NodePtr>::value),
static_assert(is_same<__rebind_pointer_t<_VoidPtr, __node_type>, _NodePtr>::value,
"_VoidPtr does not rebind to _NodePtr.");
};

Expand Down Expand Up @@ -925,11 +925,11 @@ private:
// check for sane allocator pointer rebinding semantics. Rebinding the
// allocator for a new pointer type should be exactly the same as rebinding
// the pointer using 'pointer_traits'.
static_assert((is_same<__node_pointer, typename __node_traits::pointer>::value),
static_assert(is_same<__node_pointer, typename __node_traits::pointer>::value,
"Allocator does not rebind pointers in a sane manner.");
typedef __rebind_alloc<__node_traits, __node_base> __node_base_allocator;
typedef allocator_traits<__node_base_allocator> __node_base_traits;
static_assert((is_same<__node_base_pointer, typename __node_base_traits::pointer>::value),
static_assert(is_same<__node_base_pointer, typename __node_base_traits::pointer>::value,
"Allocator does not rebind pointers in a sane manner.");

private:
Expand Down Expand Up @@ -1401,7 +1401,7 @@ template <class _ForwardIterator>
void __tree<_Tp, _Compare, _Allocator>::__assign_unique(_ForwardIterator __first, _ForwardIterator __last) {
typedef iterator_traits<_ForwardIterator> _ITraits;
typedef typename _ITraits::value_type _ItValueType;
static_assert((is_same<_ItValueType, __container_value_type>::value),
static_assert(is_same<_ItValueType, __container_value_type>::value,
"__assign_unique may only be called with the containers value type");
static_assert(
__has_forward_iterator_category<_ForwardIterator>::value, "__assign_unique requires a forward iterator");
Expand Down Expand Up @@ -1531,7 +1531,7 @@ __tree<_Tp, _Compare, _Allocator>& __tree<_Tp, _Compare, _Allocator>::operator=(

template <class _Tp, class _Compare, class _Allocator>
__tree<_Tp, _Compare, _Allocator>::~__tree() {
static_assert((is_copy_constructible<value_compare>::value), "Comparator must be copy-constructible.");
static_assert(is_copy_constructible<value_compare>::value, "Comparator must be copy-constructible.");
destroy(__root());
}

Expand Down
8 changes: 4 additions & 4 deletions libcxx/include/cmath
Original file line number Diff line number Diff line change
Expand Up @@ -561,9 +561,9 @@ inline _LIBCPP_HIDE_FROM_ABI
__promote<_A1, _A2, _A3> >::type
hypot(_A1 __lcpp_x, _A2 __lcpp_y, _A3 __lcpp_z) _NOEXCEPT {
typedef typename __promote<_A1, _A2, _A3>::type __result_type;
static_assert((!(is_same<_A1, __result_type>::value && is_same<_A2, __result_type>::value &&
is_same<_A3, __result_type>::value)),
"");
static_assert(
!(is_same<_A1, __result_type>::value && is_same<_A2, __result_type>::value && is_same<_A3, __result_type>::value),
"");
return std::hypot((__result_type)__lcpp_x, (__result_type)__lcpp_y, (__result_type)__lcpp_z);
}
#endif
Expand Down Expand Up @@ -629,7 +629,7 @@ template <class _A1,
_LIBCPP_CONSTEXPR inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type
__constexpr_copysign(_A1 __x, _A2 __y) _NOEXCEPT {
typedef typename std::__promote<_A1, _A2>::type __result_type;
static_assert((!(std::_IsSame<_A1, __result_type>::value && std::_IsSame<_A2, __result_type>::value)), "");
static_assert(!(std::_IsSame<_A1, __result_type>::value && std::_IsSame<_A2, __result_type>::value), "");
return __builtin_copysign((__result_type)__x, (__result_type)__y);
}

Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/deque
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ public:

using value_type = _Tp;

static_assert((is_same<typename _Allocator::value_type, value_type>::value),
static_assert(is_same<typename _Allocator::value_type, value_type>::value,
"Allocator::value_type must be same type as value_type");

using allocator_type = _Allocator;
Expand Down
Loading
Loading