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
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,
Std-Proposals mailing list