Wednesday 15 July 2015

c++ - Distinguishing C++11 original type-name from typedef-name? -


Is there no way to isolate one type of original name from that type of type-type?

For example:

  class C1 {}; Type CIE C1C2;   

Both C1 and C2 give the same type of name. In the code after the above, is it ever a case where the type mentioned in the question can not be replaced with the C2 (or vice versa) at the time of C1?

A typed did purpose creates an alias, and they are indistinguishable in a form. On the other hand, there are some specific syntax constructions, which require actual type, typed-aid (not declaration / definition of constructor / destructors), but this is a different question. As a form they are indistinguishable.

No comments:

Post a Comment