]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/function_types/test/classification/is_member_pointer.cpp
2 // (C) Copyright Tobias Schwinger
4 // Use modification and distribution are subject to the boost Software License,
5 // Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).
7 //------------------------------------------------------------------------------
9 #include <boost/mpl/assert.hpp>
10 #include <boost/function_types/is_member_pointer.hpp>
12 namespace ft
= boost::function_types
;
15 typedef void (*func_ptr
)();
16 typedef void (&func_ref
)();
18 typedef void (C::*mem_func_ptr
)();
19 typedef void (C::*c_mem_func_ptr
)() const;
20 typedef void (C::*v_mem_func_ptr
)() volatile;
21 typedef void (C::*cv_mem_func_ptr
)() const volatile;
22 typedef int C::*mem_ptr
;
25 BOOST_MPL_ASSERT_NOT((
26 ft::is_member_pointer
< func
>
29 BOOST_MPL_ASSERT_NOT((
30 ft::is_member_pointer
< func_ptr
>
33 BOOST_MPL_ASSERT_NOT((
34 ft::is_member_pointer
< func_ref
>
38 ft::is_member_pointer
< mem_func_ptr
>
42 ft::is_member_pointer
< c_mem_func_ptr
>
46 ft::is_member_pointer
< v_mem_func_ptr
>
50 ft::is_member_pointer
< cv_mem_func_ptr
>
54 ft::is_member_pointer
< mem_ptr
>
57 BOOST_MPL_ASSERT_NOT((
58 ft::is_member_pointer
< func_ptr
* >
61 BOOST_MPL_ASSERT_NOT((
62 ft::is_member_pointer
< mem_func_ptr
* >
65 BOOST_MPL_ASSERT_NOT((
66 ft::is_member_pointer
< mem_ptr
* >
69 BOOST_MPL_ASSERT_NOT((
70 ft::is_member_pointer
< C
>
73 BOOST_MPL_ASSERT_NOT((
74 ft::is_member_pointer
< int >
77 BOOST_MPL_ASSERT_NOT((
78 ft::is_member_pointer
< int* >
81 BOOST_MPL_ASSERT_NOT((
82 ft::is_member_pointer
< int** >
85 BOOST_MPL_ASSERT_NOT((
86 ft::is_member_pointer
< int& >