Copying the author of P1858 on this email.

Barry, in your paper you propose that a tuple type, for example:

    typedef std::tuple<int, char, float> MyTupleType;

could be turned into a parameter pack with the following syntax:

    MyTuple::[:]

Had you considered providing a language feature that would get you _all_ of the template parameters, including the constants? Let's say the syntax for this would be:

    MyTuple+

So for example consider the following code snippet:

    template<int i, int j, int k, typename A> class SomeClass1 { /*
constructor needed in here */ };
    template<int i, int j, int k, typename A> class SomeClass2 {};

    typedef SomeClass2<4,5,6,long> Monkey;

    auto &Func(Monkey const &arg)
    {
        static SomeClass1< Monkey+ > obj(arg);
        return obj;
    }

So here 'Monkey+' would expand to:

    int, int, int, typename

I suppose this would have to be a new kind of hybrid parameter pack (hybrid meaning it contains both constants and types). 


On Sunday, November 12, 2023, Bjorn Reese via Std-Proposals <std-proposals@lists.isocpp.org> wrote:
On 11/12/23 18:15, Frederick Virchanza Gotham via Std-Proposals wrote:

The operator, typename+ , turns a tuple into a parameter pack. Or it can turn a variant into a parameter pack. Or any template class into a parameter pack.

Already covered by P1858, section 4.

--
Std-Proposals mailing list
Std-Proposals@lists.isocpp.org
https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals