blob: ecd6bdfd44c1a388f7e107268ecbb11a03ab1299 (
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
29
30
31
32
33
34
35
36
37
38
39
40
|
// P0847R7
// { dg-do compile { target c++23 } }
// uses of member only operators (call op)
// execution paths for subscript with 1 argument and 0 and 2+ arguments are different
// just to be safe, also test 0 and 2 argument cases here too
struct S {
void operator()(this S&) {}
void operator()(this S&, int) {}
void operator()(this S&, int, int) {}
template<typename... Args>
void operator()(this S&, Args... args) {}
};
void non_dep()
{
S s{};
s();
s(0);
s(0, 0);
s(0, 0, 0);
}
template<typename = void>
void dependent()
{
S s{};
s();
s(0);
s(0, 0);
s(0, 0, 0);
}
void call()
{
dependent();
}
|