C++ Logo

std-proposals

Advanced search

Re: Ptr proposal: looking for feedback

From: Viktor Kireev <vitech-job_at_[hidden]>
Date: Sat, 18 Jul 2020 17:15:02 +0300
On Saturday, 18 July 2020 15:42:50 MSK Lyberta via Std-Proposals wrote:
> Ville Voutilainen via Std-Proposals:
> > ...
> > ..but if the parameter of betterfunc is supposed to be nullable, none
> > of that nonsense works.
>
> This is exactly why we need std::optional<T&> in the standard.

I think we don't need std::optional<T&> in the standard. Please look at
otn::raw::weak/unified instead (https://gitlab.com/CppObjectTokens/Module/
Library/CppOtl/-/blob/master/doc/en/Characteristics.md#raw). I think we
need pointers with such characteristics in the standard.

-- 
Victor Kireev

Received on 2020-07-18 09:18:24