aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec15.C
blob: ad01a390fefdbc1807baa7794ad07c1c8e9f5161 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// PR c++/111890
// { dg-do compile { target c++20 } }

template<class>
struct A {
  template<class T>
  struct B { };

  template<class T> requires T::value
  struct B<T> { };

  template<class T> requires (sizeof(T) == sizeof(int))
  struct B<T> {
    friend void operator+(B&, int) { }
  };
};

void f(A<int>::B<int> b) {
  b + 0;
}