C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Proposing Mixed Template Parameter Packs [initial discussion]

From: Gašper Ažman <gasper.azman_at_[hidden]>
Date: Sat, 19 Feb 2022 10:10:07 +0000
I'm planning to bring updates to the universal template parameters paper to
ewg soonish because it would be highly advantageous to have them for the
cpo paper.

You are welcome to participate in shaping that paper, there are many
semantic issues to figure out independent of syntax.

G

On Fri, Feb 18, 2022, 20:56 mail--- via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> Dear all,
>
> I have been running into limitations with respect to template parameters,
> which prevents me from writing some general-purpose helpers (e.g., for use
> in ensuring type safety and in template meta-programming). To address these
> limitations, I have worked out a small proposal for the addition of ``mixed
> template parameter packs'' to the language.
>
> I have attached an initial draft of this feature and I welcome any input
> (e.g., whether there is demand for the feature and any comments) before I
> pursue further formalization of this feature and proposing it for inclusion
> in the standard.
>
> Below is the abstract of my proposal:
> We propose the addition of mixed template parameter packs as an option for
> parameter lists in template declarations. These mixed template parameter
> packs represent zero-or-more template parameters of unknown kinds and can
> represent any combination of type, non-type, and template template
> parameters.
>
> The motivating use case for mixed template parameter packs is the
> definition
> of general-purpose concepts that hold only for a given class template X,
> this independent of the kind of template parameters X requires.
> Furthermore,
> we show that mixed template parameter packs provide a general-purpose
> strengthening of the already-excellent template meta-programming facilities
> provided by C++.
>
> With kind regards,
> Jelle Hellings
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>

Received on 2022-02-19 10:10:19