static_assert_test_fail_10.cpp 348 B

123456789101112131415161718
  1. //~ Copyright 2005 Redshift Software, Inc.
  2. //~ Distributed under the Boost Software License, Version 1.0.
  3. //~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
  4. #include <boost/static_assert.hpp>
  5. template <int N>
  6. int foo()
  7. {
  8. BOOST_STATIC_ASSERT( N < 2 );
  9. return N;
  10. }
  11. int main()
  12. {
  13. return foo<5>();
  14. }