Код: Выделить всё
#include
void dummy() { std::cout
#include
struct bar {
void operator+(int) const { std::cout
Что особенное в операторе вызова? Как возможно, что fn () < /code> неявно преобразует fn < /code>, чтобы вызвать что -то еще?#include
struct foo {
void operator()() const { std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79593162/how-is-conversion-to-function-pointer-type-special-that-it-enables-implicit-conv[/url]
Мобильная версия