Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/nodiscard1.C

raw
1 // PR c++/105143
2 // { dg-do compile { target c++20 } }
3 // We used to crash here with "Error reporting routines re-entered".
4
5 template<class...> struct A { };
6
7 template<A V> using type = int;
8
9 template<A V> [[nodiscard]] type<V> get();
10
11 int main() {
12 get<{}>(); // { dg-warning "nodiscard" }
13 }