diff options
Diffstat (limited to 'libs/static_assert/static_assert_test_fail_10.cpp')
-rw-r--r-- | libs/static_assert/static_assert_test_fail_10.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libs/static_assert/static_assert_test_fail_10.cpp b/libs/static_assert/static_assert_test_fail_10.cpp new file mode 100644 index 0000000000..ddc2d1a5de --- /dev/null +++ b/libs/static_assert/static_assert_test_fail_10.cpp @@ -0,0 +1,18 @@ +//~ Copyright 2005 Redshift Software, Inc. +//~ Distributed under the Boost Software License, Version 1.0. +//~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) + +#include <boost/static_assert.hpp> + +template <int N> +int foo() +{ + BOOST_STATIC_ASSERT( N < 2 ); + + return N; +} + +int main() +{ + return foo<5>(); +} |