aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst5.C
blob: 05959a8972c89a26625bfc6b41d3cd24dca991bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// PR c++/96164
// { dg-do compile { target concepts } }

template <int N>
struct A {
    void f() requires (N == 3) { static_assert(N == 3); }
};
template struct A<2>;

template <int N>
struct B {
    void f() requires (N == 2) { static_assert(N == 3); } // { dg-error "assert" }
};
template struct B<2>;