In c++, a pointer type (void*
/int*
/char*
) can be initialized with a value of 0 without type casting, but this doesn't work for any other value. Is it possible to instill the same behavior into a defined class? An =0
constructor, or an ==0
comparator? For clarification, I'm attempting to add syntax such that my n-dimensional vector class can be assigned to a zero vector with vec<n> dir = 0
Edit: using void* as the type of a constructor argument does in fact work, is this the best way to achieve this though?