C++ Logo


Advanced search

Subject: Re: [std-proposals] Adding piecewise_construct - constructor to std::tuple
From: Jason McKesson (jmckesson_at_[hidden])
Date: 2020-11-12 09:12:32

Piecewise in-place construction of a pair is already incredibly
cumbersome to write and read for just two values. Expanding that to N
values is going to make for some pretty nightmarish code.

Also, I'm not sure it's actually possible to extend it to N tuples.
`pair`'s piecewise-construction constructor is hard-coded to have 2
template packs in it. An N-tuple version would need to have N packs.
You can write that for any particular N, but I don't know if it's
possible for a generalized arbitrary N.

So before going down the road of a proposal, you should write an
implementation of it.

STD-PROPOSALS list run by std-proposals-owner@lists.isocpp.org

Standard Proposals Archives on Google Groups