lightweight_test_fail8.cpp 616 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // Negative test for BOOST_TEST_TRAIT_FALSE
  3. //
  4. // Copyright (c) 2014 Peter Dimov
  5. //
  6. // Distributed under the Boost Software License, Version 1.0.
  7. // See accompanying file LICENSE_1_0.txt or copy at
  8. // http://www.boost.org/LICENSE_1_0.txt
  9. //
  10. #include <boost/core/lightweight_test_trait.hpp>
  11. template<class T1, class T2> struct Y1
  12. {
  13. enum { value = 1 };
  14. };
  15. template<class T1, class T2> struct Y2
  16. {
  17. enum { value = 0 };
  18. };
  19. struct X1
  20. {
  21. typedef int type;
  22. };
  23. struct X2
  24. {
  25. typedef int type;
  26. };
  27. int main()
  28. {
  29. BOOST_TEST_TRAIT_FALSE(( Y1<X1::type, X2::type> ));
  30. return boost::report_errors();
  31. }