1 // Test that -Wnoexcept works with templates
2 // { dg-options "-std=c++0x -Wnoexcept" }
5 T f (T t) { return t; } // { dg-warning "does not throw" }
7 #define SA(X) static_assert(X, #X)
9 SA (!noexcept(f(1))); // { dg-warning "noexcept" }
13 f(1); // Use f(int) so it gets instantiated