template<typename _Tp, typename _Cp>
struct __is_member_object_pointer_helper<_Tp _Cp::*>
- : public integral_constant<bool, !is_function<_Tp>::value> { };
+ : public __not_<is_function<_Tp>>::type { };
/// is_member_object_pointer
template<typename _Tp>
template<typename _Tp, typename _Cp>
struct __is_member_function_pointer_helper<_Tp _Cp::*>
- : public integral_constant<bool, is_function<_Tp>::value> { };
+ : public is_function<_Tp>::type { };
/// is_member_function_pointer
template<typename _Tp>
/// is_compound
template<typename _Tp>
struct is_compound
- : public integral_constant<bool, !is_fundamental<_Tp>::value> { };
+ : public __not_<is_fundamental<_Tp>>::type { };
template<typename _Tp>
struct __is_member_pointer_helper
struct __do_is_nt_destructible_impl
{
template<typename _Tp>
- static integral_constant<bool, noexcept(declval<_Tp&>().~_Tp())>
- __test(int);
+ static __bool_constant<noexcept(declval<_Tp&>().~_Tp())>
+ __test(int);
template<typename>
static false_type __test(...);
/// is_trivially_constructible
template<typename _Tp, typename... _Args>
struct is_trivially_constructible
- : public __and_<is_constructible<_Tp, _Args...>, __bool_constant<
- __is_trivially_constructible(_Tp, _Args...)>>::type
+ : public __bool_constant<__is_trivially_constructible(_Tp, _Args...)>
{ };
/// is_trivially_default_constructible
template<typename _Tp>
struct __is_trivially_copy_assignable_impl<_Tp, true>
- : public __and_<is_copy_assignable<_Tp>,
- integral_constant<bool,
- __is_trivially_assignable(_Tp&, const _Tp&)>>
+ : public __bool_constant<__is_trivially_assignable(_Tp&, const _Tp&)>
{ };
template<typename _Tp>
template<typename _Tp>
struct __is_trivially_move_assignable_impl<_Tp, true>
- : public __and_<is_move_assignable<_Tp>,
- integral_constant<bool,
- __is_trivially_assignable(_Tp&, _Tp&&)>>
+ : public __bool_constant<__is_trivially_assignable(_Tp&, _Tp&&)>
{ };
template<typename _Tp>
/// is_trivially_destructible
template<typename _Tp>
struct is_trivially_destructible
- : public __and_<is_destructible<_Tp>, integral_constant<bool,
- __has_trivial_destructor(_Tp)>>
+ : public __and_<is_destructible<_Tp>,
+ __bool_constant<__has_trivial_destructor(_Tp)>>
{ };
using std::is_trivially_assignable;
using namespace __gnu_test;
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
int, int>(false), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
int&, int>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
int&, int&>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
int&, int&&>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
int&, const int&>(true), "");
+ static_assert(test_property<is_trivially_assignable,
+ int&, int*>(false), "");
+ static_assert(test_property<is_trivially_assignable,
+ int&, void*>(false), "");
+ static_assert(test_property<is_trivially_assignable,
+ const int, int>(false), "");
+ static_assert(test_property<is_trivially_assignable,
+ const int&, int>(false), "");
+ static_assert(test_property<is_trivially_assignable,
+ const int&, const int&>(false), "");
+ static_assert(test_property<is_trivially_assignable,
+ const int*&, int*>(true), "");
+ static_assert(test_property<is_trivially_assignable,
+ int*&, const int*&>(false), "");
+ static_assert(test_property<is_trivially_assignable,
+ int*&, const int&>(false), "");
+ static_assert(test_property<is_trivially_assignable,
+ const int*&, void*>(false), "");
+ static_assert(test_property<is_trivially_assignable,
+ const void*&, void*>(true), "");
+ static_assert(test_property<is_trivially_assignable,
+ const void*&, int*>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
TType, TType>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
TType&, TType>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
TType&, TType&>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
TType&, TType&&>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
TType&, const TType&>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
PODType, PODType>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
NType&, NType&>(false), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
SLType, SLType>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
assign::Empty, assign::Empty>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
assign::Abstract, assign::Abstract>(false), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
assign::Ellipsis, assign::Ellipsis>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
assign::DelEllipsis, assign::DelEllipsis>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
assign::Any, assign::Any>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
assign::DelDef, assign::DelDef>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
assign::DelCopy, assign::DelCopy>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
assign::Nontrivial, assign::Nontrivial>(false), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
assign::AnyAssign, assign::AnyAssign>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
assign::DelAnyAssign, assign::DelAnyAssign>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
assign::DelCopyAssign, assign::DelCopyAssign>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
assign::MO, assign::MO>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
assign::MO, assign::MO&&>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
assign::MO, assign::MO&>(false), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
assign::MO, const assign::MO&>(false), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
CopyConsOnlyType, CopyConsOnlyType>(false), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
CopyConsOnlyType, const CopyConsOnlyType&>(false), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
MoveConsOnlyType, MoveConsOnlyType>(false), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
MoveConsOnlyType, MoveConsOnlyType&&>(false), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
HasTemplateCAssign, HasTemplateCAssign>(false), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
HasTemplateCAssign, const HasTemplateCAssign&>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
ClassType, DerivedType>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
ClassType, DerivedType&>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
ClassType, DerivedType&&>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
ClassType, const DerivedType&>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
MoveOnly, MoveOnly>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
MoveOnly, MoveOnly&&>(true), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
MoveOnly, MoveOnly&>(false), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
MoveOnly, const MoveOnly&>(false), "");
- static_assert(test_property<is_trivially_assignable,
+ static_assert(test_property<is_trivially_assignable,
MoveOnly2, MoveOnly2>(false), "");
}