1
2// (C) Copyright Edward Diener 2011
3// Use, modification and distribution are subject to the Boost Software License,
4// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5// http://www.boost.org/LICENSE_1_0.txt).
6
7#include "test_has_template.hpp"
8#include <boost/mpl/assert.hpp>
9
10int main()
11 {
12
13 // You can always instantiate without compiler errors
14
15 BOOST_TTI_HAS_TEMPLATE_GEN(AMemberTemplate)<AnotherType> aVar;
16 HaveAnotherMT<AnotherType> aVar2;
17 BOOST_TTI_HAS_TEMPLATE_GEN(SomeMemberTemplate)<AType> aVar3;
18 BOOST_TTI_HAS_TEMPLATE_GEN(TemplateNotExist)<AType> aVar4;
19
20 // Compile time asserts
21
22 BOOST_MPL_ASSERT((BOOST_TTI_HAS_TEMPLATE_GEN(ATPMemberTemplate)<AType>));
23 BOOST_MPL_ASSERT((HaveCL<AType>));
24 BOOST_MPL_ASSERT((BOOST_TTI_HAS_TEMPLATE_GEN(SimpleTMP)<AnotherType>));
25
26 return 0;
27
28 }
29

source code of boost/libs/tti/test/test_has_template_compile.cpp