aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/testsuite/g++.dg/cpp0x/noexcept22.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/gcc/testsuite/g++.dg/cpp0x/noexcept22.C')
-rw-r--r--gcc-4.8/gcc/testsuite/g++.dg/cpp0x/noexcept22.C21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/g++.dg/cpp0x/noexcept22.C b/gcc-4.8/gcc/testsuite/g++.dg/cpp0x/noexcept22.C
new file mode 100644
index 000000000..7aab0f43c
--- /dev/null
+++ b/gcc-4.8/gcc/testsuite/g++.dg/cpp0x/noexcept22.C
@@ -0,0 +1,21 @@
+// PR c++/60046
+// { dg-require-effective-target c++11 }
+
+constexpr bool foo () { return noexcept (true); }
+template <typename T>
+struct V
+{
+ void bar (V &) noexcept (foo ()) {}
+};
+template <typename T>
+struct W : public V <int>
+{
+ void bar (W &x) { V <int>::bar (x); }
+};
+
+int
+main ()
+{
+ W <int> a, b;
+ a.bar (b);
+}