2
0
mirror of https://github.com/boostorg/tti.git synced 2026-01-25 06:42:25 +00:00
Files
tti/test/TestMFHasTemplateCompile.cpp
Edward Diener c88ecb20fb Added support for metafunction classes
[SVN r68720]
2011-02-08 16:13:22 +00:00

84 lines
2.2 KiB
C++

#include "TestMFHasTemplate.hpp"
#include <boost/mpl/assert.hpp>
int main()
{
using namespace boost::mpl::placeholders;
// You can always instantiate without compiler errors
tti::mf_has_template
<
tti::has_template_TemplateNotExist<_>,
tti::MT_BType<AType>
> aVar;
tti::mf_has_template
<
tti::mtfc_has_template_ATPMemberTemplate,
boost::mpl::identity<AnotherType>
> aVar2;
// Compile time asserts
BOOST_MPL_ASSERT((tti::mf_has_template
<
tti::HaveMStr<_>,
tti::member_type_AStructType<AType>
>
));
BOOST_MPL_ASSERT((tti::mf_has_template
<
tti::has_template_ATPMemberTemplate<_>,
boost::mpl::identity<AType>
>
));
BOOST_MPL_ASSERT((tti::mf_has_template
<
tti::HaveCL<_>,
boost::mpl::identity<AType>
>
));
BOOST_MPL_ASSERT((tti::mf_has_template
<
tti::has_template_SimpleTMP<_>,
boost::mpl::identity<AnotherType>
>
));
BOOST_MPL_ASSERT((tti::mf_has_template
<
tti::MetaHaveMStr,
tti::member_type_AStructType<AType>
>
));
BOOST_MPL_ASSERT((tti::mf_has_template
<
tti::mtfc_has_template_ATPMemberTemplate,
boost::mpl::identity<AType>
>
));
BOOST_MPL_ASSERT((tti::mf_has_template
<
tti::MFClassHaveCL,
boost::mpl::identity<AType>
>
));
BOOST_MPL_ASSERT((tti::mf_has_template
<
tti::mtfc_has_template_SimpleTMP,
boost::mpl::identity<AnotherType>
>
));
return 0;
}