diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/static_assert5.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/cpp0x/static_assert5.C | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/static_assert5.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/static_assert5.C new file mode 100644 index 0000000..36cf2eb --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/static_assert5.C @@ -0,0 +1,21 @@ +// PR c++/50837 +// { dg-do compile { target c++11 } } + +template<class T> +struct z +{ + static constexpr bool test_constexpr() + { + return true; + } + + static void test() + { + static_assert(test_constexpr(), "test1"); + } +}; + +int main() +{ + z<int>::test(); +} |