2
0
mirror of https://github.com/boostorg/tti.git synced 2026-01-25 18:52:17 +00:00
Files
tti/test/TestHasTypeCheckTypedefCompile.cpp
Edward Diener 35029182a8 Updated docs and combined has_type
[SVN r68448]
2011-01-26 00:58:45 +00:00

26 lines
842 B
C++

#include "TestHasTypeCheckTypedef.hpp"
#include <boost/mpl/assert.hpp>
int main()
{
// You can always instantiate without compiler errors
tti::TheInteger<AType::BType,short> aVar;
tti::has_type_NoOtherType<AnotherType,double> aVar2;
// Compile time asserts
BOOST_MPL_ASSERT((tti::has_type_AnIntType<AType,int>));
BOOST_MPL_ASSERT((tti::NameStruct<AType,AType::AStructType>));
BOOST_MPL_ASSERT((tti::has_type_AnIntTypeReference<AType,int &>));
BOOST_MPL_ASSERT((tti::has_type_BType<AType,AType::BType>));
BOOST_MPL_ASSERT((tti::TheInteger<AType::BType,int>));
BOOST_MPL_ASSERT((tti::has_type_CType<AType::BType,AType::BType::CType>));
BOOST_MPL_ASSERT((tti::has_type_AnotherIntegerType<AType::BType::CType,int>));
BOOST_MPL_ASSERT((tti::SomethingElse<AnotherType,AType::AnIntType>));
return 0;
}