mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-01 07:44:05 +08:00
c++: Add test for fixed PR [PR102338]
This was fixed by r12-6025 and is sufficiently different from noexcept71.C that I think we should add it. PR c++/102338 gcc/testsuite/ChangeLog: * g++.dg/cpp1y/noexcept2.C: New test.
This commit is contained in:
parent
2f34d7ef3d
commit
30b38394b4
20
gcc/testsuite/g++.dg/cpp1y/noexcept2.C
Normal file
20
gcc/testsuite/g++.dg/cpp1y/noexcept2.C
Normal file
@ -0,0 +1,20 @@
|
||||
// PR c++/102338
|
||||
// { dg-do compile { target c++14 } }
|
||||
|
||||
struct S {
|
||||
template<typename T>
|
||||
static auto f(T&& t) noexcept {
|
||||
return true;
|
||||
}
|
||||
|
||||
template<typename T, typename... Ts>
|
||||
static auto f(T&& t, Ts&& ... ts) noexcept(noexcept(f(ts...))) {
|
||||
return f(ts...);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
int main() {
|
||||
S::f(true, 0, 5u);
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user