News for hackers. Stuff that matters.
Re:Modern C++ for C Programmers: part 5 by merlincorey on Wednesday July 25, 2018 @02:30PM (#17611610)
Single-file header libraries are actually all the rage in C++ these days. Here's[1] a list even!

[1] https://github.com/nothings/single_file_libs

Re:Modern C++ for C Programmers: part 5 by std_throwaway on Wednesday July 25, 2018 @03:09PM (#17611933)
This is what you get if you're missing a proper package management that allows users to easily install their libraries.

That single file is the substitute for a package that you can simply put somewhere, include it and it works.

Re:Modern C++ for C Programmers: part 5 by tom_ on Wednesday July 25, 2018 @03:55PM (#17612262)
It takes all sorts, but I prefer the headers. Each project’s copy only gets upgraded explicitly, the debug info is always there, single stepping always works, there’s never a problem with ABI/compiler option mismatches (and you get the unoptimised version in your unoptimised build), anybody that gets the repo automatically gets all the dependencies too.
Re:Modern C++ for C Programmers: part 5 by stepik777 on Wednesday July 25, 2018 @04:02PM (#17612300)
I.e. all the things you would get from a proper package manager if there was one for C++.
Re:Modern C++ for C Programmers: part 5 by tom_ on Wednesday July 25, 2018 @07:34PM (#17613882)
Sure... but it would have to be proper-as-in-proper. And what are the chances of that? Seems to be hard enough to even enforce the rule that ``-O3 -g'' is a thing, let alone all the rest :(
Re:Modern C++ for C Programmers: part 5 by enriquto on Wednesday July 25, 2018 @06:46PM (#17613608)
> That single file is the substitute for a package that you can simply put somewhere, include it and it works.

So the substitute is much better than the package!

Re:Modern C++ for C Programmers: part 5 by de_watcher on Thursday July 26, 2018 @03:38AM (#17615748)
The package manager of my OS does fine.
Re:Modern C++ for C Programmers: part 5 by alaaibrahim on Wednesday July 25, 2018 @05:07PM (#17612816)
Wouldn't that defeat the purpose of dynamic linking?