#include <iostream>
template <typename T, unsigned int D> struct Vec
{
static_assert(0, "Invalid dimension for vector!");
};
template <typename T> struct Vec<T, 1> {union {T x, r;};};
template <typename T> struct Vec<T, 2> : Vec<T, 1> {union {T y, g;};};
template <typename T> struct Vec<T, 3> : Vec<T, 2> {union {T z, b;};};
template <typename T> struct Vec<T, 4> : Vec<T, 3> {union {T w, a;};};
int main()
{
Vec<float, 3> v;
v.x = 1;
v.y = 2;
v.z = 3;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdGVtcGxhdGUgPHR5cGVuYW1lIFQsIHVuc2lnbmVkIGludCBEPiBzdHJ1Y3QgVmVjCnsKCXN0YXRpY19hc3NlcnQoMCwgIkludmFsaWQgZGltZW5zaW9uIGZvciB2ZWN0b3IhIik7Cn07Cgp0ZW1wbGF0ZSA8dHlwZW5hbWUgVD4gc3RydWN0IFZlYzxULCAxPiAgICAgICAgICAgICB7dW5pb24ge1QgeCwgcjt9O307CnRlbXBsYXRlIDx0eXBlbmFtZSBUPiBzdHJ1Y3QgVmVjPFQsIDI+IDogVmVjPFQsIDE+IHt1bmlvbiB7VCB5LCBnO307fTsKdGVtcGxhdGUgPHR5cGVuYW1lIFQ+IHN0cnVjdCBWZWM8VCwgMz4gOiBWZWM8VCwgMj4ge3VuaW9uIHtUIHosIGI7fTt9Owp0ZW1wbGF0ZSA8dHlwZW5hbWUgVD4gc3RydWN0IFZlYzxULCA0PiA6IFZlYzxULCAzPiB7dW5pb24ge1QgdywgYTt9O307CgppbnQgbWFpbigpCnsKCVZlYzxmbG9hdCwgMz4gdjsKCXYueCA9IDE7Cgl2LnkgPSAyOwoJdi56ID0gMzsKCQoJcmV0dXJuIDA7Cn0=