Generating parameter list at compile time

55 views Asked by At
template<typename ... Args>
class Container 
{

    public:

    Container(Args&& ... args)
    : values_(std::forward<Args>(args)...)
    {}

    private:

    std::tuple<Args ...> values_;

};

Considering the code above, this is valid:

typedef Container<double,double,double> Container3d;

Would something like this be possible ?

typedef Container<3,double> Container3d;

Note that this should still remain possible:

Container<double,int> c(0.1,2);
0

There are 0 answers