diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-using2.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-using2.C | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-using2.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-using2.C new file mode 100644 index 0000000..59a65e5 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-using2.C @@ -0,0 +1,18 @@ +// PR c++/49520 +// { dg-do compile { target c++11 } } + +namespace x { void foo(); } + +template<typename T> +struct traits +{ + static constexpr bool f() { return true; } + + static constexpr bool g() + { + using x::foo; + return f() && noexcept(foo()); + } +}; + +template struct traits<int>; |