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_static_mem_data.hpp" |
8 | #include <boost/detail/lightweight_test.hpp> |
9 | |
10 | int main() |
11 | { |
12 | |
13 | BOOST_TEST((BOOST_TTI_HAS_STATIC_MEMBER_DATA_GEN(DSMember)<AType,short>::value)); |
14 | BOOST_TEST((!BOOST_TTI_HAS_STATIC_MEMBER_DATA_GEN(SomeStaticData)<AnotherType,float>::value)); |
15 | BOOST_TEST((StatName<AnotherType,AType::AStructType>::value)); |
16 | BOOST_TEST((BOOST_TTI_HAS_STATIC_MEMBER_DATA_GEN(CIntValue)<AnotherType,const int>::value)); |
17 | |
18 | #if !defined(BOOST_NO_CXX11_UNRESTRICTED_UNION) |
19 | |
20 | BOOST_TEST((UnionStatic<AType::AnUnion,float>::value)); |
21 | BOOST_TEST((BOOST_TTI_HAS_STATIC_MEMBER_DATA_GEN(ASCData)<AnotherType::AnotherUnion,char>::value)); |
22 | |
23 | #endif |
24 | |
25 | // Passing non-class enclosing type will return false |
26 | |
27 | BOOST_TEST((!BOOST_TTI_HAS_STATIC_MEMBER_DATA_GEN(DSMember)<unsigned short,short>::value)); |
28 | BOOST_TEST((!StatName<AnotherType *,AType::AStructType>::value)); |
29 | |
30 | return boost::report_errors(); |
31 | |
32 | } |
33 | |