hi,
then could you make me some examples when it's suggested to use forward declaration (to improve speed compilation)?
thanks
hi,
then could you make me some examples when it's suggested to use forward declaration (to improve speed compilation)?
thanks
what I worndered is "what" I can/must declare with "forward declaration" (eg. vector seems not)
Any of your own classes.
For any STL and standard library, you must use "forward headers" if they exist (headers that contain forward declarations). Otherwise you're out of luck.
But precompiled headers can usually help here, by putting those headers inside the PCH.