c++ - Typedef of private class without exposing it -


when using multiple nested classes becomes unnecessarily verbose spell out full class name, typedef can public classes when using on private, typedef can not access class. there way use typedef or similar without making class visible?

edit:

example:

classa.h

class class_a {     private:       class class_b;   }; 

classb.h

class classa::class_b {     private:       class class_c;       void func();   }; 

classb.cpp

 void class_a::class_b::func(){        //     }; 

cannot following make name shorter:

typedef class_a::class_b td_classb; 

cannot following make name shorter:

typedef class_a::class_b td_classb; 

it makes sense can't old place. after all, class_b private nested class of class_a.

you can use in class or function has access private section of class.


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -