typedefs defined inside a class are “part of the class”, that is to say the typedef isn’t visible/accessible outside the class functions unless you fully qualify it by class::typedefname
Additionally the typedef is also public, protected or private depending so it’s access is also restricted to code outside the class.
The C++ template library makes heavy use of typedefs to achieve all sorts of handy features.
typedef
最新推荐文章于 2024-12-07 23:09:08 发布