typedef type checking?
Consider using a strong typedef: https://www.boost.org/doc/libs/release/boost/serialization/strong_typedef.hpp
To expand upon Nawaz's answer: when you typedef A B
, then B
is just an alias for A
, not a separate type. x
and y
are just int
's in your example.
If you want to create a new type, use a one-member struct
.
As long as T1
and T2
are typedefs of same type, you will not get any warning!