Clang Project

clang_source_code/test/CXX/except/except.spec/p2-places-1z.cpp
1// RUN: %clang_cc1 -std=c++1z -fexceptions -fcxx-exceptions -fsyntax-only -verify %s
2
3// In C++1z, we can put an exception-specification on any function declarator; the
4// corresponding paragraph from C++14 and before was deleted.
5// expected-no-diagnostics
6
7void f() noexcept;
8void (*fp)() noexcept;
9void (**fpp)() noexcept;
10void g(void (**pfa)() noexcept);
11void (**h())() noexcept;
12
13template<typename T> struct A {};
14template<void() noexcept> struct B {};
15A<void() noexcept> a;
16B<f> b;
17auto *p = new decltype(f)**;
18