2 ms·
The only thing that forward declaration buys you is avoiding to include a header, which is not that expensive in C, but thanks to templates something as innocen
by imtringued 1y ago
The only thing that forward declaration buys you is avoiding to include a header, which is not that expensive in C, but thanks to templates something as innocent as including a header can become infinitely expensive in C++.
- thegrim33 1y agoForward declaration breaks dependency chains so that you don't need to recompile vast swathes of your codebase anytime an upstream header file is modified.