Created on 2023-10-05.00:00:00 last changed 6 months ago
Consider:
void f() noexcept {}
void g(void (*)() noexcept) {}
void g(void (&)()) {}
int main() {
g(f); // error: ambiguous
}
In contrast:
void f() noexcept {} void g(void (*)()) {} void g(void (&)()) {} // #1 int main() { g(f); // OK, calls #1 }
In both cases, binding void(&)() to void() noexcept is considered an identity conversion, without further disambiguation by 12.2.4.3 [over.ics.rank].
History | |||
---|---|---|---|
Date | User | Action | Args |
2023-10-05 00:00:00 | admin | create |