diff --git a/Jamfile b/Jamfile index 53a69de..a677de0 100644 --- a/Jamfile +++ b/Jamfile @@ -17,6 +17,7 @@ test-suite static_assert : [ compile-fail static_assert_test_fail_6.cpp ] [ compile-fail static_assert_test_fail_7.cpp ] [ compile-fail static_assert_test_fail_8.cpp ] + [ compile-fail static_assert_test_fail_function.cpp ] ; diff --git a/static_assert_test_fail_function.cpp b/static_assert_test_fail_function.cpp new file mode 100644 index 0000000..ddc2d1a --- /dev/null +++ b/static_assert_test_fail_function.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 + +template +int foo() +{ + BOOST_STATIC_ASSERT( N < 2 ); + + return N; +} + +int main() +{ + return foo<5>(); +}