aantron / better-enums

C++ compile-time enum to string, iteration, in a single header file
http://aantron.github.io/better-enums
BSD 2-Clause "Simplified" License
1.67k stars 173 forks source link

Put enum.h inside include/betterenums subdirectory. #38

Open ecorm opened 7 years ago

ecorm commented 7 years ago

You should put enum.h inside an include/betterenums subdirectory of your Git repository. This would allow superproject build scripts to clone your Git repo as-is and add -I superproject/thirdpartylibs/betterenums/include compiler flags where appropriate.

To include your header, we would use

#include <betterenums/enum.h>

which would avoid collisions with other headers named enum.h.

aantron commented 7 years ago

Agreed in principle, though, since it's a one-header library, it might be better to rename the file to better_enums.h, or something.

ecorm commented 7 years ago

If you decide to rename to better_enums.h, you should at least put it inside an include subdirectory, so that all the other files in your repository's root directory don't pollute the #include path. Many large project build scripts clone third-party dependencies directly from GitHub and leave the subrepo's file/directory structure intact.

aantron commented 7 years ago

Fair enough.