Add static_assert test to test use inside template functions. Currently this test fails on CW-8.x compilers.

[SVN r28904]
This commit is contained in:
Rene Rivera
2005-05-14 18:44:59 +00:00
parent 3959c96e26
commit 11be1f5a93
2 changed files with 19 additions and 0 deletions

View File

@ -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 ]
;

View File

@ -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>();
}