C++ Logo

std-proposals

Advanced search

Re: P2192 R1 -- request for comments

From: Thiago Macieira <thiago_at_[hidden]>
Date: Sat, 12 Sep 2020 09:20:09 -0700
On Friday, 11 September 2020 00:06:44 PDT Dejan Milosavljevic via Std-
Proposals wrote:
> Is it possible to simplify valstat as:
> template< typename T, typename S>
> using valstat = std::pair< std::optional<T>, std::optional<S> >;

As far as I can see from the proposal, that would actually be:

template< typename T, typename S>
 using valstat = std::pair<T, S>;

Which is why I asked in my reply why this type is necessary at all. There's a
perfectly legitimate answer as "this conveys more meaning, that the two
carried types are related, not just simply a pair".

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

Received on 2020-09-12 11:20:14