blob: f990ae17859a53e67e7f4fd07c16ba05e64e9bc9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// PR c++/101247
// { dg-do compile { target concepts } }
// A variant of concepts-memtmpl3.C where f is defined outside A's definition.
template <typename> struct A {
template <typename c> static constexpr bool d = true;
struct B;
template <typename> struct C;
};
template <typename a>
struct A<a>::B {
template <typename c> static void f(c) requires d<c>;
};
template <typename a>
template <typename b>
struct A<a>::C {
template <typename c> static void f(c) requires d<c>;
static void g() requires d<b>;
};
int main()
{
A<void>::B::f(0);
A<void>::C<int>::f(0);
A<void>::C<int>::g();
}
|