Код: Выделить всё
#include
#include
template
struct W {
operator T&() { return *t; }
operator bool() const {
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79020163/conversion-operator-and-bool-operator-for-if-init-expression[/url]