Remix.run Logo
whizzter 4 days ago

The irony is that including/using many standard c++ headers is far far more expensive than including a lean windows.h these days.

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).

pjmlp 3 days ago | parent [-]

Not when using modules, which I have moved into on hobby projects.

The import std is much faster than plain #include<iostream>.

maccard 3 days ago | parent [-]

This is a fair point. Last time I tried modules in anger, it wasn't viable. Cmake didn't support them (well, they were experimental), intellisense didn't work and there were many ICE's in MSVC.

Maybe it's time to move my hobby project over and see how well it works.

pjmlp 3 days ago | parent [-]

I give you that Intelisense is broken as always, and the best experience appears to be with Clion, but I can live with it.

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

maccard 3 days ago | parent [-]

I've just spent an hour trying to set up import std to use std::print on MacOS. I got there, eventually with cmake + ninja. I hit an absolutely ludicrious number of errors for effectively a hello world, and I don't understand why in 2026 it is as complicated as it is.

But, no ICEs and it's working! I'll start writing some code with them tomorrow.