I am a fan of the
using
and
typedef
statements. They are pretty close to the same thing for this purpose although the
using
statement has quite a bit more capability.
For this you can add some statements to define the types in layers. Let's say you want a vector of vectors of vectors of data. Here's how that might look.
using vdata = std::vector< data >;
using vvdata = std::vector< vdata >; using vvvdata = std::vector< vvdata >;
vvvvdata MyVector;
The equivalent
typedef
statement for the first
using
statement there is :
typedef std::vector< data > vdata;
As you can see, they are essentially backwards from each other and
typedef
does not use an equals sign.