Should a typedef be both in the class definition and class declaration?
问题 I'm learning C++. I know that C++ is a bit more verbose than most other languages, however defining a typedef in a struct/ class declaration and then again in the struct/ class definition got me thinking if there isn't a better or more central place for the typedef where it only has to be defined once, and whether this follows what is thought of as C++ best practices. I couldn't find anything in particular about this on the web. Moving the typedef to a more global place seems inappropriate