Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>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;
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading