test_has_static_mem_data_compile.cpp 660 B

123456789101112131415161718192021222324
  1. // (C) Copyright Edward Diener 2011
  2. // Use, modification and distribution are subject to the Boost Software License,
  3. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  4. // http://www.boost.org/LICENSE_1_0.txt).
  5. #include "test_has_static_mem_data.hpp"
  6. #include <boost/mpl/assert.hpp>
  7. int main()
  8. {
  9. // You can always instantiate without compiler errors
  10. BOOST_TTI_HAS_STATIC_MEMBER_DATA_GEN(SomeStaticData)<AnotherType,long> aVar2;
  11. // Compile time asserts
  12. BOOST_MPL_ASSERT((BOOST_TTI_HAS_STATIC_MEMBER_DATA_GEN(DSMember)<AType,short>));
  13. BOOST_MPL_ASSERT((StatName<AnotherType,AType::AStructType>));
  14. return 0;
  15. }