C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Adding and_then, or_else, value_or and transform to std::unique_ptr, std::shared_ptr and std::weak_ptr.

From: Andre Kostur <andre_at_[hidden]>
Date: Tue, 7 Jul 2026 20:55:25 -0700
> I would also like to personally object to adding std::optional<&T> and suggest calling the same construct std::optref<T> (or std::optional_ref<T>) because it is confusing that, as C++ references go, std::optional<&T> doesn't walk like a duck. Although, the use cases illustrated in P2988R12 are compelling.

Pretty sure the ship on that has long sailed. C++26 is in the final
voting stages and mostly out of the hands of the committee at this
point.

Received on 2026-07-08 03:55:38