Alias of a long tuple type

I have been trying to make a alias of a tuple type e.g. like:

// Alias the the type I want - gives compile error
using std::tuple<int, float, int, int, float, double> = my_type;

// Then I can use this type (alias):
my_type data = {
    {1, 1.0, 1, 1, 1.0, 1.0},
    {2, 1.0, 1, 1, 1.0, 1.0},
    {3, 1.0, 1, 1, 1.0, 1.0}
}

This is the answer that keeps popping up, but does not really answer my question: How to create a alias of std::tuple?

Is there a way to express this?

>Solution :

you have it wrong direction

using my_type = std::tuple<int, float, int, int, float, double>;

that direction is used by typedef btw (like a declaration)

typedef std::tuple<int, float, int, int, float, double> my_type;

Leave a Reply