Skip to content

Commit 01837aa

Browse files
committed
[libc++][NFC] Remove unnecessary parens in static_asserts
1 parent 0e21f12 commit 01837aa

33 files changed

+77
-79
lines changed

libcxx/include/__atomic/memory_order.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ enum class memory_order : __memory_order_underlying_t {
3737
seq_cst = __mo_seq_cst
3838
};
3939

40-
static_assert((is_same<underlying_type<memory_order>::type, __memory_order_underlying_t>::value),
40+
static_assert(is_same<underlying_type<memory_order>::type, __memory_order_underlying_t>::value,
4141
"unexpected underlying type for std::memory_order");
4242

4343
inline constexpr auto memory_order_relaxed = memory_order::relaxed;

libcxx/include/__hash_table

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,9 @@ public:
240240

241241
private:
242242
static_assert(!is_const<__node_type>::value, "_NodePtr should never be a pointer to const");
243-
static_assert((is_same<typename pointer_traits<_VoidPtr>::element_type, void>::value),
243+
static_assert(is_same<typename pointer_traits<_VoidPtr>::element_type, void>::value,
244244
"_VoidPtr does not point to unqualified void type");
245-
static_assert((is_same<__rebind_pointer_t<_VoidPtr, __node_type>, _NodePtr>::value),
245+
static_assert(is_same<__rebind_pointer_t<_VoidPtr, __node_type>, _NodePtr>::value,
246246
"_VoidPtr does not rebind to _NodePtr.");
247247
};
248248

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

710710
private:
@@ -1101,8 +1101,8 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u, const
11011101
template <class _Tp, class _Hash, class _Equal, class _Alloc>
11021102
__hash_table<_Tp, _Hash, _Equal, _Alloc>::~__hash_table() {
11031103
#if defined(_LIBCPP_CXX03_LANG)
1104-
static_assert((is_copy_constructible<key_equal>::value), "Predicate must be copy-constructible.");
1105-
static_assert((is_copy_constructible<hasher>::value), "Hasher must be copy-constructible.");
1104+
static_assert(is_copy_constructible<key_equal>::value, "Predicate must be copy-constructible.");
1105+
static_assert(is_copy_constructible<hasher>::value, "Hasher must be copy-constructible.");
11061106
#endif
11071107

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

12341234
if (bucket_count() != 0) {

libcxx/include/__math/exponential_functions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ inline _LIBCPP_HIDE_FROM_ABI long double pow(long double __x, long double __y) _
160160
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
161161
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type pow(_A1 __x, _A2 __y) _NOEXCEPT {
162162
using __result_type = typename __promote<_A1, _A2>::type;
163-
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
163+
static_assert(!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value), "");
164164
return __math::pow((__result_type)__x, (__result_type)__y);
165165
}
166166

libcxx/include/__math/fdim.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ inline _LIBCPP_HIDE_FROM_ABI long double fdim(long double __x, long double __y)
3737
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
3838
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type fdim(_A1 __x, _A2 __y) _NOEXCEPT {
3939
using __result_type = typename __promote<_A1, _A2>::type;
40-
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
40+
static_assert(!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value), "");
4141
return __math::fdim((__result_type)__x, (__result_type)__y);
4242
}
4343

libcxx/include/__math/fma.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ template <class _A1,
4242
__enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value && is_arithmetic<_A3>::value, int> = 0>
4343
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2, _A3>::type fma(_A1 __x, _A2 __y, _A3 __z) _NOEXCEPT {
4444
using __result_type = typename __promote<_A1, _A2, _A3>::type;
45-
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value &&
46-
_IsSame<_A3, __result_type>::value)),
47-
"");
45+
static_assert(
46+
!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value && _IsSame<_A3, __result_type>::value),
47+
"");
4848
return __builtin_fma((__result_type)__x, (__result_type)__y, (__result_type)__z);
4949
}
5050

libcxx/include/__math/hypot.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ inline _LIBCPP_HIDE_FROM_ABI long double hypot(long double __x, long double __y)
3737
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
3838
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type hypot(_A1 __x, _A2 __y) _NOEXCEPT {
3939
using __result_type = typename __promote<_A1, _A2>::type;
40-
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
40+
static_assert(!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value), "");
4141
return __math::hypot((__result_type)__x, (__result_type)__y);
4242
}
4343

libcxx/include/__math/inverse_trigonometric_functions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ inline _LIBCPP_HIDE_FROM_ABI long double atan2(long double __y, long double __x)
8888
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
8989
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type atan2(_A1 __y, _A2 __x) _NOEXCEPT {
9090
using __result_type = typename __promote<_A1, _A2>::type;
91-
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
91+
static_assert(!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value), "");
9292
return __math::atan2((__result_type)__y, (__result_type)__x);
9393
}
9494

libcxx/include/__math/min_max.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ _LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI long double fmax(long double __x,
4141
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
4242
_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type fmax(_A1 __x, _A2 __y) _NOEXCEPT {
4343
using __result_type = typename __promote<_A1, _A2>::type;
44-
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
44+
static_assert(!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value), "");
4545
return __math::fmax((__result_type)__x, (__result_type)__y);
4646
}
4747

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

libcxx/include/__math/modulo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ inline _LIBCPP_HIDE_FROM_ABI long double fmod(long double __x, long double __y)
3939
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
4040
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type fmod(_A1 __x, _A2 __y) _NOEXCEPT {
4141
using __result_type = typename __promote<_A1, _A2>::type;
42-
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
42+
static_assert(!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value), "");
4343
return __math::fmod((__result_type)__x, (__result_type)__y);
4444
}
4545

libcxx/include/__math/remainder.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ inline _LIBCPP_HIDE_FROM_ABI long double remainder(long double __x, long double
4040
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
4141
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type remainder(_A1 __x, _A2 __y) _NOEXCEPT {
4242
using __result_type = typename __promote<_A1, _A2>::type;
43-
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
43+
static_assert(!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value), "");
4444
return __math::remainder((__result_type)__x, (__result_type)__y);
4545
}
4646

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

libcxx/include/__math/rounding_functions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ inline _LIBCPP_HIDE_FROM_ABI long double nextafter(long double __x, long double
160160
template <class _A1, class _A2, __enable_if_t<is_arithmetic<_A1>::value && is_arithmetic<_A2>::value, int> = 0>
161161
inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type nextafter(_A1 __x, _A2 __y) _NOEXCEPT {
162162
using __result_type = typename __promote<_A1, _A2>::type;
163-
static_assert((!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value)), "");
163+
static_assert(!(_IsSame<_A1, __result_type>::value && _IsSame<_A2, __result_type>::value), "");
164164
return __math::nextafter((__result_type)__x, (__result_type)__y);
165165
}
166166

libcxx/include/__mdspan/extents.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ struct __maybe_static_array {
165165
template <class... _DynVals>
166166
requires(sizeof...(_DynVals) != __size_dynamic_)
167167
_LIBCPP_HIDE_FROM_ABI constexpr __maybe_static_array(_DynVals... __vals) {
168-
static_assert((sizeof...(_DynVals) == __size_), "Invalid number of values.");
168+
static_assert(sizeof...(_DynVals) == __size_, "Invalid number of values.");
169169
_TDynamic __values[__size_] = {static_cast<_TDynamic>(__vals)...};
170170
for (size_t __i = 0; __i < __size_; __i++) {
171171
_TStatic __static_val = _StaticValues::__get(__i);
@@ -185,7 +185,7 @@ struct __maybe_static_array {
185185
template <class _Tp, size_t _Size>
186186
requires(_Size != __size_dynamic_)
187187
_LIBCPP_HIDE_FROM_ABI constexpr __maybe_static_array(const span<_Tp, _Size>& __vals) {
188-
static_assert((_Size == __size_) || (__size_ == dynamic_extent));
188+
static_assert(_Size == __size_ || __size_ == dynamic_extent);
189189
for (size_t __i = 0; __i < __size_; __i++) {
190190
_TStatic __static_val = _StaticValues::__get(__i);
191191
if (__static_val == _DynTag) {

libcxx/include/__mdspan/layout_left.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class layout_left::mapping {
6767
return true;
6868
}
6969

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

7373
public:

libcxx/include/__mdspan/layout_right.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class layout_right::mapping {
6666
return true;
6767
}
6868

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

7272
public:

libcxx/include/__mdspan/layout_stride.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ class layout_stride::mapping {
149149
}
150150
}
151151

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

155155
public:

libcxx/include/__numeric/gcd_lcm.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ struct __ct_abs<_Result, _Source, false> {
5353

5454
template <class _Tp>
5555
_LIBCPP_CONSTEXPR _LIBCPP_HIDDEN _Tp __gcd(_Tp __a, _Tp __b) {
56-
static_assert((!is_signed<_Tp>::value), "");
56+
static_assert(!is_signed<_Tp>::value, "");
5757

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

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

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

libcxx/include/__thread/thread.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class __thread_specific_ptr {
6565

6666
// Only __thread_local_data() may construct a __thread_specific_ptr
6767
// and only with _Tp == __thread_struct.
68-
static_assert((is_same<_Tp, __thread_struct>::value), "");
68+
static_assert(is_same<_Tp, __thread_struct>::value, "");
6969
__thread_specific_ptr();
7070
friend _LIBCPP_EXPORTED_FROM_ABI __thread_specific_ptr<__thread_struct>& __thread_local_data();
7171

libcxx/include/__tree

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ struct __tree_node_base_types {
574574
#endif
575575

576576
private:
577-
static_assert((is_same<typename pointer_traits<_VoidPtr>::element_type, void>::value),
577+
static_assert(is_same<typename pointer_traits<_VoidPtr>::element_type, void>::value,
578578
"_VoidPtr does not point to unqualified void type");
579579
};
580580

@@ -614,7 +614,7 @@ public:
614614

615615
private:
616616
static_assert(!is_const<__node_type>::value, "_NodePtr should never be a pointer to const");
617-
static_assert((is_same<__rebind_pointer_t<_VoidPtr, __node_type>, _NodePtr>::value),
617+
static_assert(is_same<__rebind_pointer_t<_VoidPtr, __node_type>, _NodePtr>::value,
618618
"_VoidPtr does not rebind to _NodePtr.");
619619
};
620620

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

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

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

libcxx/include/cmath

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -561,9 +561,9 @@ inline _LIBCPP_HIDE_FROM_ABI
561561
__promote<_A1, _A2, _A3> >::type
562562
hypot(_A1 __lcpp_x, _A2 __lcpp_y, _A3 __lcpp_z) _NOEXCEPT {
563563
typedef typename __promote<_A1, _A2, _A3>::type __result_type;
564-
static_assert((!(is_same<_A1, __result_type>::value && is_same<_A2, __result_type>::value &&
565-
is_same<_A3, __result_type>::value)),
566-
"");
564+
static_assert(
565+
!(is_same<_A1, __result_type>::value && is_same<_A2, __result_type>::value && is_same<_A3, __result_type>::value),
566+
"");
567567
return std::hypot((__result_type)__lcpp_x, (__result_type)__lcpp_y, (__result_type)__lcpp_z);
568568
}
569569
#endif
@@ -629,7 +629,7 @@ template <class _A1,
629629
_LIBCPP_CONSTEXPR inline _LIBCPP_HIDE_FROM_ABI typename __promote<_A1, _A2>::type
630630
__constexpr_copysign(_A1 __x, _A2 __y) _NOEXCEPT {
631631
typedef typename std::__promote<_A1, _A2>::type __result_type;
632-
static_assert((!(std::_IsSame<_A1, __result_type>::value && std::_IsSame<_A2, __result_type>::value)), "");
632+
static_assert(!(std::_IsSame<_A1, __result_type>::value && std::_IsSame<_A2, __result_type>::value), "");
633633
return __builtin_copysign((__result_type)__x, (__result_type)__y);
634634
}
635635

libcxx/include/deque

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ public:
448448

449449
using value_type = _Tp;
450450

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

454454
using allocator_type = _Allocator;

0 commit comments

Comments
 (0)