Код: Выделить всё
#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-function-call-operator-special-that-it-allows-implicit-conversion-of-this[/url]
Мобильная версия