C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Proposal to allow multiple template parameter packs for class templates provided they can be deduced using CTAD

From: Barry Revzin <barry.revzin_at_[hidden]>
Date: Sat, 29 Apr 2023 11:30:23 -0500
On Sat, Apr 29, 2023 at 9:37 AM Jens Maurer via Std-Proposals <
std-proposals_at_[hidden]> wrote:

>
>
> On 29/04/2023 06.43, Anoop Rana via Std-Proposals wrote:
> > Attached is the proposal to allow multiple template parameter packs for
> class templates provided they can be deduced using CTAD.
>
> The "before - after" comparison should not just show "invalid";
> it should show for "before" the workaround that you need to take
> today to achieve the same result. I guess passing around several
> tuples might work today.
>
> Jens
>

Also why isn't it sufficient to do this:

template <typename F, typename... Args>
struct C;

template <typename... Param, typename Ret, typename... Args>
struct C<Ret(*)(Param...), Args...>
{
    C(Ret (*ptrFunc)(const Param&... param), const Args&... args);
};

Which is valid today?

Barry

Received on 2023-04-29 16:30:36