How do i create unique types like that of boost files?

I've been studying metaprogramming and reviewing many documents and code regarding boost files. What I've been trying to understand and accomplish is creating various types using typedef, template and struct, similar to that of the boost files themselves, to create comparators. Ultimately, I want to be able to create a type that has sub-properties which can be further compareded and classified.

I apologize in advance as I cannot provide any working attempt at this. I am in the struggle.

Where other variables can be represented based off this i,j,k standard and written in a more direct vector form.

And so on...

I don't know how helpful this is to those of you who are more experienced with this sort of style, but what I essintially would like to do is have x,y,z variables act as standards for an i,j,k system that classify arbitrary variables of the coordinate type: Is the arbitrary variable i, j, or k? Is it defined as an int or float type?

Where arguments such as sum_y = var1 + var2; are valid, provided:sum_y is outputted as 6j, and var1 and var2 are 2j and 4j, respectively.

Please don't over-analyze what I have provided. Just focus on the concept I am bringing forward. I know that the examples above are rough, but I myself don't know all the ins and outs for how to approach this.

kbw, when you say 'class', do you mean struct? I'm unaware of the differences between the two when it comes to metaprogramming style. When they are used, I just think: structs have a public default which must be why they are chosen over classes.

JLBorges, that seems pretty close; although, I haven't had a chance to test it and mess around with the piece of code you provided.

I think the following link may help further demonstrate my idea. It is a boost example that shows almost exactly what it is I am trying to accomplish. Except, I don't plan to develop a system to the extent that they do.

The reason C++ programmers prefer either class or struct is just preference.
The reason old code tends to use struct us because it was written in C.
The reason beginners tend to use one or the other is because that's how their professor taught them.

Generally though, when you hear "class" you should think of both keywords.

Lastly, is this style of program still alive? The reason I ask this is because I hardly ever hear people talk of it, or see anyone write code in that manner. I hope this is something that is useful and that im not wasting my time.