2
0
mirror of https://github.com/boostorg/tti.git synced 2026-01-27 07:22:12 +00:00
Files
tti/test/TestVMMFHasTemplateCheckParamsCompile.cpp
Edward Diener 9dbb6c128e Added metafunction and updated doc.
[SVN r67598]
2011-01-02 21:20:16 +00:00

53 lines
1.4 KiB
C++

#include "TestVMMFHasTemplateCheckParams.hpp"
#include <boost/mpl/assert.hpp>
int main()
{
#if !defined(BOOST_NO_VARIADIC_MACROS)
// You can always instantiate without compiler errors
tti::mf_has_template_check_params
<
tti::has_template_check_params_TemplateNotExist,
tti::mf_member_type
<
tti::member_type_CType,
tti::MT_BType<AType>
>
> aVar;
// Compile time asserts
BOOST_MPL_ASSERT((tti::mf_has_template_check_params
<
tti::HT_Str,
tti::member_type_AStructType<AType>
>
));
BOOST_MPL_ASSERT((tti::mf_has_template_check_params
<
tti::has_template_check_params_AnotherMemberTemplate,
boost::mpl::identity<AType>
>
));
BOOST_MPL_ASSERT((tti::mf_has_template_check_params
<
tti::has_template_check_params_CTManyParameters,
tti::mf_member_type
<
tti::member_type_CType,
tti::MT_BType<AType>
>
>
));
#endif //!defined(BOOST_NO_VARIADIC_MACROS)
return 0;
}