aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts-using4.C
blob: a39a7c0a8a36016884f343b1bf68e1b55073102d (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
// PR c++/113498
// { dg-do compile { target c++20 } }

template<int d>
struct S_Base
{
    static constexpr int D = d;
};

template<int d>
struct S : public S_Base<d>
{
    using S_Base<d>::D;
    constexpr void f() const
        requires(D > 0) {}

};

int main(int, char**)
{
    S<1> s;
    s.f();
    return 0;
}