X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=senf%2FUtils%2Ftype_traits.test.cc;fp=senf%2FUtils%2Ftype_traits.test.cc;h=16b9b3ff7c4784b38752141e9494ed577e52f45b;hb=084d18afd1abb3c6b19de612dbdf4dbc40ffd795;hp=9b1c3ab357424b87082b72adfdb6469c7f2dbd22;hpb=c770f9c19d48a50742b9f45e492c12c601bdb1fd;p=senf.git diff --git a/senf/Utils/type_traits.test.cc b/senf/Utils/type_traits.test.cc index 9b1c3ab..16b9b3f 100644 --- a/senf/Utils/type_traits.test.cc +++ b/senf/Utils/type_traits.test.cc @@ -38,7 +38,7 @@ ///////////////////////////////cc.p//////////////////////////////////////// namespace { - struct Class {}; + struct Class; } BOOST_AUTO_UNIT_TEST(typeTraits) @@ -60,11 +60,35 @@ BOOST_AUTO_UNIT_TEST(typeTraits) >::value )); BOOST_STATIC_ASSERT(( boost::is_same< - senf::remove_member_pointer< int (Class::*) >::type, - int + senf::remove_member_pointer< Class (Class::*) >::type, + Class >::value )); BOOST_STATIC_ASSERT(( boost::is_same< - senf::remove_member_pointer< void (Class::*)(int) >::type, + senf::remove_member_pointer< Class const (Class::*) >::type, + Class const + >::value )); + BOOST_STATIC_ASSERT(( boost::is_same< + senf::remove_member_pointer< Class (Class::*)(int) >::type, + Class (int) + >::value )); + BOOST_STATIC_ASSERT(( boost::is_same< + senf::remove_member_pointer< Class const (Class::*)(int) >::type, + Class const (int) + >::value )); + BOOST_STATIC_ASSERT(( boost::is_same< + senf::remove_member_pointer< void (Class::*)(int) const>::type, + void (int) + >::value )); + BOOST_STATIC_ASSERT(( boost::is_same< + senf::remove_member_pointer< Class const (Class::*)(int) const>::type, + Class const (int) + >::value )); + BOOST_STATIC_ASSERT(( boost::is_same< + senf::remove_member_pointer< void (Class::* const)(int)>::type, + void (int) + >::value )); + BOOST_STATIC_ASSERT(( boost::is_same< + senf::remove_member_pointer< void (Class::* const)(int) const>::type, void (int) >::value )); @@ -97,6 +121,7 @@ BOOST_AUTO_UNIT_TEST(typeTraits) BOOST_STATIC_ASSERT(( senf::is_any_function< void () >::value )); BOOST_STATIC_ASSERT(( senf::is_any_function< void (*)(int) >::value )); BOOST_STATIC_ASSERT(( senf::is_any_function< void (Class::*)() >::value )); + BOOST_STATIC_ASSERT(( senf::is_any_function< void (Class::*)() const >::value )); BOOST_STATIC_ASSERT(( ! senf::is_any_function< int * >::value )); BOOST_STATIC_ASSERT(( boost::is_same<