]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/tti/test/test_has_member_cv_compile.cpp
2 // (C) Copyright Edward Diener 2013
3 // Use, modification and distribution are subject to the Boost Software License,
4 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt).
7 #include "test_has_mem_fun.hpp"
8 #include <boost/mpl/assert.hpp>
13 // You can always instantiate without compiler errors
15 BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(someFunctionMember
)<double (AnotherType::*)(short,short,long,int) volatile> aVar1
;
19 BOOST_MPL_ASSERT((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(AConstFunction
)<double (AType::*)(long,char) const>));
20 BOOST_MPL_ASSERT((StillTest
<AType (AnotherType::*)(int) const>));
21 BOOST_MPL_ASSERT((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(AnotherConstFunction
)<int (AnotherType::*)(AType
*, short) const>));
22 BOOST_MPL_ASSERT((AskIfConst
<void (AType::*)(float,double) const>));
26 BOOST_MPL_ASSERT((AnVol
<int (AnotherType::*)(AType
*,short) volatile>));
27 BOOST_MPL_ASSERT((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(AVolatileFunction
)<double (AType::*)(long,char) volatile>));
28 BOOST_MPL_ASSERT((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(StillVolatile
)<bool (AnotherType::*)(int) volatile>));
29 BOOST_MPL_ASSERT((Volly
<void (AType::*)(float,double) volatile>));
33 BOOST_MPL_ASSERT((CVAnother
<int (AnotherType::*)(AType
*,short) const volatile>));
34 BOOST_MPL_ASSERT((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(StillCV
)<short (AnotherType::*)(int) const volatile>));
35 BOOST_MPL_ASSERT((BOOST_TTI_HAS_MEMBER_FUNCTION_GEN(ConstVolFunction
)<void (AType::*)(float,double) const volatile>));
36 BOOST_MPL_ASSERT((CVBoth
<double (AType::*)(long,char) const volatile>));