2
0
mirror of https://github.com/boostorg/tti.git synced 2026-01-26 19:12:11 +00:00
Files
tti/test/TestMFHasTemplateCompile.cpp
Edward Diener 793458e3ee Updated functionality and tests
[SVN r68669]
2011-02-06 16:29:00 +00:00

56 lines
1.3 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::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>
>
));
return 0;
}