C++ boost forward declaration question -


I spend some time investigating the architecture of boost :: libraries and the following facts I'm interested in:

/ P>

In a few parts of the libraries, a yyy_fwd.hpp idea is very common (see boost / detail or boost / flyweight for example).

These files are clearly forward-forwarded announcements of some template-based classes, and as far as I understand, there can be profit in the context of compile time.

Did anyone tell me in which cases they help and should I use the same idea while designing my ideas?

Thanks.

Forwarding dependency time, forwarded announcements are necessary. For example, when applying Pimpl idiom.

There is one more case, for example, boost :: pool * depends on windows H Windows platform But while building my interface I do not want my class users to force the system headers to be included using my interface.


* Okay, this is a bad example, because boost / poolfwd.hpp still windows.h , but I hope they will fix this problem. And I hope you get this idea.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -