C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Use optional<T> as though it were T

From: Thiago Macieira <thiago_at_[hidden]>
Date: Tue, 04 Jul 2023 13:47:32 -0700
On Tuesday, 4 July 2023 11:01:42 PDT Frederick Virchanza Gotham via Std-
Proposals wrote:
> On Tuesday, July 4, 2023, Frederick Virchanza Gotham wrote:
> > Well maybe they could all be static functions instead of member
> >
> > functions.
>
> Or another possibility:
>
> You must use 'std::direct' to access the holder object. For example:
>
> std::optional_direct<T> obj;
>
> std::direct(obj).emplace("monkey", 5);

You do realise this is exactly why those papers have not made progress, right?

BTW, have you drafted any papers of your ideas in the last 6 months? There
were a few that seemed promising.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DCAI Cloud Engineering

Received on 2023-07-04 20:47:34