6 ms·
Packing the entire library in a header file is a somewhat recent and much welcome trend. See for example: https://github.com/nothings/stb https://github.com/n
by ur-whale 5y ago
Packing the entire library in a header file is a somewhat recent and much welcome trend.
See for example:
https://github.com/nothings/stb https://github.com/nothings/stb
https://github.com/nothings/single_file_libs https://github.com/nothings/single_file_libs
- mkl 5y agoI wouldn't call it recent. Boost has been doing it since it was started in the late 1990s.
- ChrisMarshallNY 5y agoThe original C++ templates used to be entirely contained in the headers. I assume that is no longer the case, but it has been a long time, since I wrote C++. When I was writing template SDKs, the headers were pretty much the entirety of the library.
- flohofwoe 5y agoBoost or C++ stdlib headers are different than STB-style single-file-libraries though in that the implementation code is inline and needs to be parsed each time the header is included.
- tommiegannert 5y agoBoost did it because C++ template definitions must be in headers. That seems unrelated to this idea that C code using it is equally reasonable. That's a developer choice.