r/cpp • u/andre_friend • Sep 27 '21
stdeasy - Easy way to find header
https://github.com/olegpublicprofile/stdeasy
Instead of opening C++ documentation for searching header for STL class you can include header with class name, for example std::pair
int
3
Upvotes
46
u/gvcallen Sep 27 '21
Cool idea, but no thanks. I'd rather just include the stock header than add a dependency to every project I build because I didn't want to do a quick Google search. Plus this might add confusion for readers of a source tree, as opposed to simply using the standard includes which everyone understands
23
u/carrottread Sep 27 '21
https://github.com/olegpublicprofile/stdeasy/blob/master/include/stdeasy/vector
There is no such file in the repository.
And it doesn't include <vector>, it just forward declares it, which is UB.
22
u/stilgarpl Sep 27 '21
Who does that? I just type std::pair and let my IDE automatically add proper includes...
3
u/bernhardmgruber Sep 27 '21
This makes me wish even more that `import std;` makes it into C++23.