How to speed up g++ compile time (when using a lot of templates)

后端 未结 10 1190
悲&欢浪女
悲&欢浪女 2020-12-22 18:46

This question is perhaps somehow odd, but how can I speed up g++ compile time? My C++ code heavily uses boost and templates. I already moved as much as possible out of the h

10条回答
  •  一生所求
    2020-12-22 19:13

    Try the PIMPL technique, this question: What techniques can be used to speed up C++ compilation times?

    It'll prevent the compiler from following the chain of header files and implementations every time you need to do something.

提交回复
热议问题