Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/concepts/diagnostic7.C @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | |
children |
line wrap: on
line source
// { dg-do compile { target c++2a } } template<typename A, typename B> concept same_as = __is_same(A, B); void f(); static_assert(requires { { f() } noexcept -> same_as<int>; }); // { dg-error "static assertion failed" "" { target *-*-* } .-1 } // { dg-message "not .noexcept." "" { target *-*-* } .-2 } // { dg-message "return-type-requirement" "" { target *-*-* } .-3 }