mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-27 13:54:19 +08:00
Use __and_v<...> instead of __and_<...>::value
* include/std/any (any::any(ValueType&&)): Use __and_v. * include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)): Likewise. From-SVN: r270552
This commit is contained in:
parent
81c7cf71bf
commit
303b226457
@ -1,5 +1,9 @@
|
||||
2019-04-24 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
* include/std/any (any::any(ValueType&&)): Use __and_v.
|
||||
* include/std/numeric (midpoint(T, T, T), midpoint(T*, T*, T*)):
|
||||
Likewise.
|
||||
|
||||
* include/std/tuple (apply): Use remove_reference_t instead of decay_t
|
||||
as per P0777R1.
|
||||
* include/std/type_traits (__result_of_memfun): Use remove_reference
|
||||
|
@ -189,9 +189,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
/// Construct with a copy of @p __value as the contained object.
|
||||
template <typename _ValueType, typename _Tp = _Decay<_ValueType>,
|
||||
typename _Mgr = _Manager<_Tp>,
|
||||
enable_if_t<__and_<is_copy_constructible<_Tp>,
|
||||
__not_<is_constructible<_Tp, _ValueType&&>>,
|
||||
__not_<__is_in_place_type<_Tp>>>::value,
|
||||
enable_if_t<__and_v<is_copy_constructible<_Tp>,
|
||||
__not_<is_constructible<_Tp, _ValueType&&>>,
|
||||
__not_<__is_in_place_type<_Tp>>>,
|
||||
bool> = false>
|
||||
any(_ValueType&& __value)
|
||||
: _M_manager(&_Mgr::_S_manage)
|
||||
|
@ -162,8 +162,8 @@ namespace __detail
|
||||
|
||||
template<typename _Tp>
|
||||
constexpr
|
||||
enable_if_t<__and_<is_arithmetic<_Tp>, is_same<remove_cv_t<_Tp>, _Tp>,
|
||||
__not_<is_same<_Tp, bool>>>::value,
|
||||
enable_if_t<__and_v<is_arithmetic<_Tp>, is_same<remove_cv_t<_Tp>, _Tp>,
|
||||
__not_<is_same<_Tp, bool>>>,
|
||||
_Tp>
|
||||
midpoint(_Tp __a, _Tp __b) noexcept
|
||||
{
|
||||
@ -192,8 +192,7 @@ template<typename _Tp>
|
||||
|
||||
template<typename _Tp>
|
||||
constexpr
|
||||
enable_if_t<__and_<is_object<_Tp>, bool_constant<sizeof(_Tp) != 0>>::value,
|
||||
_Tp*>
|
||||
enable_if_t<__and_v<is_object<_Tp>, bool_constant<sizeof(_Tp) != 0>>, _Tp*>
|
||||
midpoint(_Tp* __a, _Tp* __b) noexcept
|
||||
{
|
||||
return __a > __b ? __b + (__a - __b) / 2 : __a + (__b - __a) / 2;
|
||||
|
Loading…
Reference in New Issue
Block a user