C++ Logo

std-proposals

Advanced search

[std-proposals] Floating an idea: Dereference operators for std::reference_wrapper

From: Jeremy Rifkin <jeremy_at_[hidden]>
Date: Tue, 24 Sep 2024 23:52:32 -0500
Hi,
It'd be useful for me to have `std::reference_wrapper::operator->` and
`std::reference_wrapper::operator*`. As far as I can tell this has not
been proposed before. It would follow the precedent of std::optional as
well as the forwarding comparison operators added in P2944. Has this
been considered before or are there any glaring issues with such a functionality?

Cheers,
Jeremy

Received on 2024-09-25 04:52:38