]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/libs/type_traits/test/is_member_pointer_test.cpp
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / boost / libs / type_traits / test / is_member_pointer_test.cpp
CommitLineData
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
15TT_TEST_BEGIN(is_member_pointer)
16
17BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<f1>::value, false);
18BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<f2>::value, false);
19BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<f3>::value, false);
20BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<void*>::value, false);
21BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<mf1>::value, true);
22BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<mf2>::value, true);
23BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<mf3>::value, true);
24BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<mf4>::value, true);
25BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<cmf>::value, true);
26BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<mp>::value, true);
27BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<void>::value, false);
28BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<test_abc1>::value, false);
29BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<foo0_t>::value, false);
30
31#ifdef BOOST_TT_TEST_MS_FUNC_SIGS
32typedef void (__stdcall test_abc1::*scall_proc)();
33BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<scall_proc>::value, true);
34typedef void (__fastcall test_abc1::*fcall_proc)(int);
35BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<fcall_proc>::value, true);
36typedef void (__cdecl test_abc1::*ccall_proc)(int, long, double);
37BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_member_pointer<ccall_proc>::value, true);
38#endif
39
40TT_TEST_END
41
42
43
44
45
46
47
48