Msgpack23 – A modern, header-only C++ library for MessagePack (de)serialization
github.com
github.com
The header only fad seems to because of a lack of one? IIRC they're more costly compilation wise too.
As for the compilation cost, modern C++ tries to adress that with modules.
I consider being a header-only "library" a code smell. It's purely for convenience, at the cost of compilation speed.
That being said, there are package managers like vcpkg and conan that work just fine. They will just never be ubiquitous like pip or npm or cargo. Projects are going to continue to want to manage these sorts of issues themselves in a lot of circumstances.
For new projects on a supported platform, I'd recommend going ahead and just using vcpkg. But that's just my opinion. And there is code I work on where that wouldn't be possible. Plus some people just don't like the things that package managers tend to encourage.
Templates cannot be compiled. They have to necesserily be distributed as header files. Furthermore, header files, unlike compiled code are easier to support on a wider variaty of platforms.
They are more constly to include, as you said.
You could technically create concrete classes or functions from the templates by supplying all the necessary type arguments, and compile that. But then the developer using your library will only be able to "use the template" with those particular type arguments. The flexibility that the templates offer is removed.
Unfortunate.