int main() { BOOST_TEST(boost::tti::mf_valid_member_type<BOOST_TTI_MEMBER_TYPE_GEN(AnIntType)<AType> >::value); BOOST_TEST(boost::tti::mf_valid_member_type<BOOST_TTI_TRAIT_GEN(NameStruct)<AType> >::value); BOOST_TEST(boost::tti::mf_valid_member_type<BOOST_TTI_MEMBER_TYPE_GEN(AnIntTypeReference)<AType> >::value); BOOST_TEST(boost::tti::mf_valid_member_type<BOOST_TTI_MEMBER_TYPE_GEN(BType)<AType> >::value); BOOST_TEST(boost::tti::mf_valid_member_type<BOOST_TTI_TRAIT_GEN(TheInteger)<AType::BType> >::value); BOOST_TEST(boost::tti::mf_valid_member_type<BOOST_TTI_MEMBER_TYPE_GEN(CType)<AType::BType> >::value); BOOST_TEST(boost::tti::mf_valid_member_type<BOOST_TTI_MEMBER_TYPE_GEN(AnotherIntegerType)<AType::BType::CType> >::value); BOOST_TEST(boost::tti::mf_valid_member_type<BOOST_TTI_TRAIT_GEN(SomethingElse)<AnotherType> >::value); return boost::report_errors(); }
int main() { BOOST_TEST(BOOST_TTI_HAS_TEMPLATE_CHECK_PARAMS_GEN(ATPMemberTemplate)<AType>::value); BOOST_TEST(BOOST_TTI_TRAIT_GEN(HaveCL)<AType>::value); BOOST_TEST(BOOST_TTI_HAS_TEMPLATE_CHECK_PARAMS_GEN(AMemberTemplate)<AType>::value); BOOST_TEST(BOOST_TTI_TRAIT_GEN(HaveAnotherMT)<AType>::value); BOOST_TEST(BOOST_TTI_HAS_TEMPLATE_CHECK_PARAMS_GEN(SomeMemberTemplate)<AnotherType>::value); BOOST_TEST(BOOST_TTI_TRAIT_GEN(ATemplateWithParms)<AnotherType>::value); BOOST_TEST(BOOST_TTI_HAS_TEMPLATE_CHECK_PARAMS_GEN(SimpleTMP)<AnotherType>::value); BOOST_TEST(!BOOST_TTI_HAS_TEMPLATE_CHECK_PARAMS_GEN(TemplateNotExist)<AnotherType>::value); return boost::report_errors(); }
// (C) Copyright Edward Diener 2011 // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). #include "test_has_static_mem_fun.hpp" #include <boost/detail/lightweight_test.hpp> int main() { BOOST_TEST((BOOST_TTI_TRAIT_GEN(HaveTheSIntFunction)<AType,int,boost::mpl::vector<long,double> >::value)); BOOST_TEST((!BOOST_TTI_TRAIT_GEN(TheTIntFunction)<AType,AType,boost::mpl::vector<long,double> >::value)); BOOST_TEST((BOOST_TTI_TRAIT_GEN(TheTIntFunction)<AnotherType,AType,boost::mpl::vector<long,double> >::value)); BOOST_TEST((BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION_GEN(TSFunction)<AnotherType,AType::AStructType,boost::mpl::vector<AType::AnIntType,double> >::value)); BOOST_TEST((!BOOST_TTI_TRAIT_GEN(Pickedname)<AnotherType,void>::value)); return boost::report_errors(); }
// (C) Copyright Edward Diener 2011 // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). #include "test_has_mem_data.hpp" #include <boost/detail/lightweight_test.hpp> int main() { BOOST_TEST((BOOST_TTI_HAS_MEMBER_DATA_GEN(AnInt)<AType,int>::value)); BOOST_TEST((BOOST_TTI_HAS_MEMBER_DATA_GEN(AnInt)<AnotherType,long>::value)); BOOST_TEST((BOOST_TTI_HAS_MEMBER_DATA_GEN(aMember)<AnotherType,bool>::value)); BOOST_TEST((!BOOST_TTI_HAS_MEMBER_DATA_GEN(aMember)<AnotherType,int>::value)); BOOST_TEST((BOOST_TTI_TRAIT_GEN(CMember)<AnotherType,bool>::value)); BOOST_TEST((!BOOST_TTI_HAS_MEMBER_DATA_GEN(someDataMember)<AType,short>::value)); BOOST_TEST((BOOST_TTI_HAS_MEMBER_DATA_GEN(IntBT)<AType,AType::BType>::value)); BOOST_TEST((BOOST_TTI_TRAIT_GEN(NestedData)<AType,AType::BType::CType>::value)); BOOST_TEST((BOOST_TTI_TRAIT_GEN(AOther)<AnotherType,AType>::value)); BOOST_TEST((BOOST_TTI_HAS_MEMBER_DATA_GEN(ONestStr)<AnotherType,AType::AStructType>::value)); return boost::report_errors(); }
// (C) Copyright Edward Diener 2011 // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). #include "test_has_static_mem_data.hpp" #include <boost/detail/lightweight_test.hpp> int main() { BOOST_TEST((BOOST_TTI_HAS_STATIC_MEMBER_DATA_GEN(DSMember)<AType,short>::value)); BOOST_TEST((!BOOST_TTI_HAS_STATIC_MEMBER_DATA_GEN(SomeStaticData)<AnotherType,float>::value)); BOOST_TEST((BOOST_TTI_TRAIT_GEN(StatName)<AnotherType,AType::AStructType>::value)); BOOST_TEST((BOOST_TTI_HAS_STATIC_MEMBER_DATA_GEN(CIntValue)<AnotherType,const int>::value)); return boost::report_errors(); }
// (C) Copyright Edward Diener 2011 // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). #include "test_has_type_ct.hpp" #include <boost/detail/lightweight_test.hpp> int main() { BOOST_TEST((BOOST_TTI_HAS_TYPE_GEN(AnIntType)<AType,int>::value)); BOOST_TEST((BOOST_TTI_TRAIT_GEN(NameStruct)<AType,AType::AStructType>::value)); BOOST_TEST((BOOST_TTI_HAS_TYPE_GEN(AnIntTypeReference)<AType,int &>::value)); BOOST_TEST((BOOST_TTI_HAS_TYPE_GEN(BType)<AType,AType::BType>::value)); BOOST_TEST((BOOST_TTI_TRAIT_GEN(TheInteger)<AType::BType,int>::value)); BOOST_TEST((BOOST_TTI_HAS_TYPE_GEN(CType)<AType::BType,AType::BType::CType>::value)); BOOST_TEST((BOOST_TTI_HAS_TYPE_GEN(AnotherIntegerType)<AType::BType::CType,int>::value)); BOOST_TEST((BOOST_TTI_TRAIT_GEN(SomethingElse)<AnotherType,AType::AnIntType>::value)); BOOST_TEST((!BOOST_TTI_HAS_TYPE_GEN(NoOtherType)<AnotherType,double>::value)); return boost::report_errors(); }