Код: Выделить всё
template
class handle {
public:
handle(T const& t) : t_{&t} {}
T const& operator*() const {
assert(t_); //
Подробнее здесь: [url]https://stackoverflow.com/questions/79812530/does-it-ever-make-sense-to-allow-copies-but-no-moves[/url]
Мобильная версия