Open
Description
> Calling the member of a base type.
But all reject the UFCS macro on this (https://compiler-explorer.com/z/fe3j4ex9Y, https://cpp2.godbolt.org/z/xKT6dzTjr):
namespace N {
struct B {
void f();
};
}
struct D : N::B { };
void g() {
D d;
d.B::f(); // OK.
static_cast<void>(
[&](auto&& obj) {
if constexpr (requires { obj.B::f(); })
return obj.B::f();
else
return B::f(obj); // Error: No `B`.
}
);
}
Originally posted by @JohelEGP in #746 (comment)
Metadata
Metadata
Assignees
Labels
No labels