Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/cpp0x/noexcept53.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
line wrap: on
line source
// PR c++/86476 - noexcept-specifier is a complete-class context // { dg-do compile { target c++11 } } struct S { void f1() noexcept(noexcept(fn())); void f2() noexcept(noexcept(fnx())); void fn(); void fnx() noexcept; }; void S::f1() noexcept // { dg-error "different exception specifier" } { } void S::f2() // { dg-error "different exception specifier" } { } struct S2 { void f1() noexcept(noexcept(nosuchfn())); // { dg-error "not declared in this scope" } void f2() noexcept(noexcept(nothere)); // { dg-error "not declared in this scope" } void f3() noexcept(noexcept(nosuchfn())) { } // { dg-error "not declared in this scope" } void f4() noexcept(noexcept(nothere)) { } // { dg-error "not declared in this scope" } };