forked from boostorg/type_traits
Big update for is_function and is_member_function_pointer for modern compilers with modern features.
See https://github.com/boostorg/type_traits/issues/81.
This commit is contained in:
1 parent
f78c5330cd
commit
52fbd03a6c
3 files changed
+521
No files matched your search
@@ -12,6 +12,19 @@
|
||||
#include "test.hpp"
|
||||
#include "check_integral_constant.hpp"
|
||||
|
||||
struct X
|
||||
{
|
||||
void f() {}
|
||||
void fc() const {}
|
||||
void fv() volatile {}
|
||||
void fcv() const volatile {}
|
||||
};
|
||||
|
||||
template< class C, class F > void test_cv_qual(F C::*)
|
||||
{
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(boost::is_function< F >::value, true);
|
||||
}
|
||||
|
||||
TT_TEST_BEGIN(is_function)
|
||||
|
||||
typedef void foo0_t();
|
||||
@@ -72,6 +85,15 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<sfoo4_t>::value, true);
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES
|
||||
|
||||
test_cv_qual(&X::f);
|
||||
test_cv_qual(&X::fc);
|
||||
test_cv_qual(&X::fv);
|
||||
test_cv_qual(&X::fcv);
|
||||
|
||||
#endif
|
||||
|
||||
TT_TEST_END
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user