test_has_static_member_compile.cpp 807 B

1234567891011121314151617181920212223242526
  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_fun.hpp"
  6. #include <boost/mpl/assert.hpp>
  7. int main()
  8. {
  9. // You can always instantiate without compiler errors
  10. TheTIntFunction<AType,void (long,double)> aVar;
  11. Pickedname<AnotherType,AType (long,long)> aVar3;
  12. // Compile time asserts
  13. BOOST_MPL_ASSERT((HaveTheSIntFunction<AType,int (long,double)>));
  14. BOOST_MPL_ASSERT((TheTIntFunction<AnotherType,AType (long,double)>));
  15. BOOST_MPL_ASSERT((BOOST_TTI_HAS_STATIC_MEMBER_FUNCTION_GEN(TSFunction)<AnotherType,AType::AStructType (AType::AnIntType,double)>));
  16. return 0;
  17. }