aboutsummaryrefslogtreecommitdiff
path: root/test/CXX/except/except.spec/p1.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CXX/except/except.spec/p1.cpp')
-rw-r--r--test/CXX/except/except.spec/p1.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/CXX/except/except.spec/p1.cpp b/test/CXX/except/except.spec/p1.cpp
index a32f37d55208..fa53c9f5d23f 100644
--- a/test/CXX/except/except.spec/p1.cpp
+++ b/test/CXX/except/except.spec/p1.cpp
@@ -77,5 +77,12 @@ namespace PR11084 {
static int f() noexcept(1/X) { return 10; } // expected-error{{argument to noexcept specifier must be a constant expression}} expected-note{{division by zero}}
};
- void g() { A<0>::f(); } // expected-note{{in instantiation of exception specification for 'f' requested here}}
+ template<int X> void f() {
+ int (*p)() noexcept(1/X); // expected-error{{argument to noexcept specifier must be a constant expression}} expected-note{{division by zero}}
+ };
+
+ void g() {
+ A<0>::f(); // expected-note{{in instantiation of exception specification for 'f'}}
+ f<0>(); // expected-note{{in instantiation of function template specialization}}
+ }
}