aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/nodiscard1.C
blob: c3c5094b619b58793d40669f2b189bf585120082 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// PR c++/105143
// { dg-do compile { target c++20 } }
// We used to crash here with "Error reporting routines re-entered".

template<class...> struct A { };

template<A V> using type = int;

template<A V> [[nodiscard]] type<V> get();

int main() {
  get<{}>(); // { dg-warning "nodiscard" }
}