I also like to use it sometimes to "hide" private methods and their documentation into PIMPL, so the public header is kept clean.
Yep, that's what I've used it for. Didn't find it too difficult to implement it myself, but I guess every bit of convenience/bug avoidance helps.
Not sure how much pimpl is used in reality, but it's a pretty ok solution to speed up build times (apart from unity builds), because it avoids having to include headers that are only needed for the private state into the public interface header.
#define WIN32_LEAN_AND_MEAN 1
#include <windows.h>
In precompiled headers to solve that particular problem.To make hobby-coding fun, i use a mstdp.hpp that implements "naive" versions of unique,shared,function,etc that compiles faster than including just one of the std versions (and yes, MSVC versions of those libraries seem to be excessivly complex).
The import std is much faster than plain #include<iostream>.
Maybe it's time to move my hobby project over and see how well it works.
Best experience is VC++ with MSBuild, cmake/ninja work great with latest clang however import std support is not yet enabled by default in CMake.
I only care about VC++ for hobby coding, hence using modules.
See for example, https://github.com/pjmlp/RaytracingWeekend-CPP
But, no ICEs and it's working! I'll start writing some code with them tomorrow.
> Still best only used in implementation files, not headers.
We only compile implementation files!