| 1 | |
| 2 | // (C) Copyright Edward Diener 2019 |
| 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). |
| 6 | |
| 7 | #include "test_has_mem_fun_template.hpp" |
| 8 | #include <boost/mpl/assert.hpp> |
| 9 | |
| 10 | int main() |
| 11 | { |
| 12 | |
| 13 | // Use const enclosing type |
| 14 | |
| 15 | BOOST_MPL_ASSERT((FirstCMFT<const AType,double,boost::mpl::vector<short,long> >)); |
| 16 | |
| 17 | // Use const_qualified |
| 18 | |
| 19 | BOOST_MPL_ASSERT((BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE_GEN(WFunctionTmp)<AType,void,boost::mpl::vector<int **, long &, bool>,boost::function_types::const_qualified>)); |
| 20 | |
| 21 | // Use volatile enclosing type |
| 22 | |
| 23 | BOOST_MPL_ASSERT((BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE_GEN(AVolatileFT)<volatile AType,double,boost::mpl::vector<float, long, char> >)); |
| 24 | BOOST_MPL_ASSERT((BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE_GEN(VWithDefault)<volatile AnotherType,void,boost::mpl::vector<float,double> >)); |
| 25 | |
| 26 | // Use volatile_qualified |
| 27 | |
| 28 | BOOST_MPL_ASSERT((VolG<AType,void,boost::mpl::vector<long &>,boost::function_types::volatile_qualified>)); |
| 29 | |
| 30 | // Use const volatile enclosing type |
| 31 | |
| 32 | BOOST_MPL_ASSERT((ACV<const volatile AType,double,boost::mpl::vector<int,short> >)); |
| 33 | |
| 34 | // Use const_volatile_qualified |
| 35 | |
| 36 | BOOST_MPL_ASSERT((BOOST_TTI_HAS_MEMBER_FUNCTION_TEMPLATE_GEN(ConstVolTTFun)<AType,void,boost::mpl::vector<float,double>,boost::function_types::cv_qualified>)); |
| 37 | |
| 38 | return 0; |
| 39 | |
| 40 | } |
| 41 | |