aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp23/explicit-obj-ops-mem-assignment.C
blob: bb43a0af913bc8d33849e8caca626549998ffe6c (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
// P0847R7
// { dg-do compile { target c++23 } }

// uses of member only operators (assignment)

struct S {
  void operator=(this S&, int) {}
};

void non_dep()
{
  S s{};
  s = 0;
}

template<typename = void>
void dependent()
{
  S s{};
  s = 0;
}

void call()
{
  dependent();
}