Forward Declaration of a Base Class

前端 未结 6 637
旧巷少年郎
旧巷少年郎 2020-12-10 01:57

I\'m trying to create proper header files which don\'t include too many other files to keep them clean and to speed up compile time.

I encountered two problems while

6条回答
  •  青春惊慌失措
    2020-12-10 02:49

    You're trying too hard to solve something that isn't actually a problem. Use the header files you need, and reduce - WHERE POSSIBLE - the requirement for them. But don't try and take it to extremes because you'll fail.

    In some cases, the PIMPL idiom may help you, but not here.

提交回复
热议问题