1 
2 //  (C) Copyright Edward Diener 2019
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_class.hpp"
8 #include <boost/detail/lightweight_test.hpp>
9 
main()10 int main()
11   {
12 
13   BOOST_TEST(!BOOST_TTI_HAS_CLASS_GEN(AnIntType)<AType>::value);
14   BOOST_TEST(!BOOST_TTI_HAS_CLASS_GEN(AnIntTypeReference)<AType>::value);
15   BOOST_TEST(NameStruct<AType>::value);
16   BOOST_TEST(BOOST_TTI_HAS_CLASS_GEN(BType)<AType>::value);
17   BOOST_TEST(!TheInteger<AType::BType>::value);
18   BOOST_TEST(BOOST_TTI_HAS_CLASS_GEN(CType)<AType::BType>::value);
19   BOOST_TEST(!BOOST_TTI_HAS_CLASS_GEN(AnotherIntegerType)<AType::BType::CType>::value);
20   BOOST_TEST(!SomethingElse<AnotherType>::value);
21   BOOST_TEST(!BOOST_TTI_HAS_CLASS_GEN(NoOtherType)<AnotherType>::value);
22 
23   BOOST_TEST(!EInB<AType::BType>::value);
24   BOOST_TEST(!BOOST_TTI_HAS_CLASS_GEN(AnEnumTtype)<AType>::value);
25   BOOST_TEST(!AnotherE<AnotherType>::value);
26   BOOST_TEST(!EClass<AType>::value);
27   BOOST_TEST(!BOOST_TTI_HAS_CLASS_GEN(AnotherEnumClassType)<AnotherType>::value);
28   BOOST_TEST(!BOOST_TTI_HAS_CLASS_GEN(CTypeUnion)<AType::BType::CType>::value);
29   BOOST_TEST(!SimpleUT<AType>::value);
30   BOOST_TEST(!BOOST_TTI_HAS_CLASS_GEN(AnotherUnion)<AnotherType>::value);
31 
32   BOOST_TEST(UnionType<AType::AnUnion>::value);
33 
34   // Passing non-class enclosing type will return false
35 
36   BOOST_TEST(!BOOST_TTI_HAS_CLASS_GEN(AnIntTypeReference)<signed long>::value);
37   BOOST_TEST(!NameStruct<AType &>::value);
38 
39   return boost::report_errors();
40 
41   }
42