]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | |
2 | // (C) Copyright John Maddock 2000. | |
3 | // Use, modification and distribution are subject to the | |
4 | // Boost Software License, Version 1.0. (See accompanying file | |
5 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
6 | ||
7c673cae FG |
7 | #ifdef TEST_STD |
8 | # include <type_traits> | |
9 | #else | |
10 | # include <boost/type_traits/is_member_pointer.hpp> | |
11 | #endif | |
11fdf7f2 TL |
12 | #include "test.hpp" |
13 | #include "check_integral_constant.hpp" | |
7c673cae FG |
14 | |
15 | TT_TEST_BEGIN(is_member_pointer) | |
16 | ||
17 | BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<f1>::value, false); | |
18 | BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<f2>::value, false); | |
19 | BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<f3>::value, false); | |
20 | BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<void*>::value, false); | |
21 | BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<mf1>::value, true); | |
22 | BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<mf2>::value, true); | |
23 | BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<mf3>::value, true); | |
24 | BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<mf4>::value, true); | |
25 | BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<cmf>::value, true); | |
26 | BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<mp>::value, true); | |
27 | BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<void>::value, false); | |
28 | BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<test_abc1>::value, false); | |
29 | BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<foo0_t>::value, false); | |
30 | ||
31 | #ifdef BOOST_TT_TEST_MS_FUNC_SIGS | |
32 | typedef void (__stdcall test_abc1::*scall_proc)(); | |
33 | BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<scall_proc>::value, true); | |
34 | typedef void (__fastcall test_abc1::*fcall_proc)(int); | |
35 | BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<fcall_proc>::value, true); | |
36 | typedef void (__cdecl test_abc1::*ccall_proc)(int, long, double); | |
37 | BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<ccall_proc>::value, true); | |
38 | #endif | |
39 | ||
40 | TT_TEST_END | |
41 | ||
42 | ||
43 | ||
44 | ||
45 | ||
46 | ||
47 | ||
48 |