Subject: Re: [std-proposals] Remove restriction on deduction guides.
From: Jason McKesson (jmckesson_at_[hidden])
Date: 2021-02-20 13:00:43
On Sat, Feb 20, 2021 at 11:32 AM Arthur O'Dwyer via Std-Proposals
> By the way, another fantasy feature that would solve your problem is
> if a metafunction could return a first-class pack. Then you could
> write something like
> template<class F> receiver(F&&) -> receiver<
> detail::corresponding_template_args<receiver, F>... >;
> But of course that doesn't help you today.
I'm not sure how "fantasy" that is, as there have been a number of
proposals batted around about storing parameter packs and unpacking
them. It's difficult to track the status of proposals these days, but
P1858 is being discussed in EWG at present, and P2277 is probably a
better overview of where things currently stand.
In any case, if you can store packs more arbitrarily, such as in a
template type alias or something, then it should be easy enough to
have a metafunction that returns a pack given a set of template
parameters. And therefore, we wouldn't need a language change for this
feature; you just do what you said above.
STD-PROPOSALS list run by email@example.com
Standard Proposals Archives on Google Groups