logoalt Hacker News

feverzsjtoday at 7:48 AM3 repliesview on HN

Yes, if you actually care compile times.


Replies

RossBencinatoday at 8:25 AM

Indeed. I primarily used PIMPL when I want to avoid polluting public header files with implementation detail #includes in cases where forward declarations are impossible or unwieldy and inline methods are irrelevant.

einpoklumtoday at 8:30 AM

My approach to reducing the compile time of code which uses a class is moving the functionality out of the class and into standalone functions; or at least moving the method definitions into a non-header `.cpp` file.

otabdeveloper4today at 8:33 AM

Lucky for you, I don't.