[PATCH] libstdc++: Make std::unique_ptr::operator* SFINAE-friendly

Jonathan Wakely jwakely@redhat.com
Fri May 1 11:51:20 GMT 2026


On Thu, 30 Apr 2026 at 23:55, Nathan Myers wrote:
>
> This seems to be saying that existing code performing the
> check builds OK, but might be getting the wrong answer;

Yes, that was the status quo before we added the conditional noexcept.

> and
> that with this change we can ensure that, built to C++20 and
> later, such code will still build and will furthermore reliably
> get the right answer, while code built to an older Standard,
> although it could still get the wrong answer, will anyway get
> the same answer as before.
>
> Do I understand correctly?

Exactly right.

I've updated the commit log to make that a little clearer and will
send a v2 patch in a moment.



More information about the Libstdc++ mailing list