magic_enum
magic_enum copied to clipboard
Add MAGIC_ENUM_USE_STD_MODULE option to use standard library module.
This PR adds two functionalities:
- When user declares
MAGIC_ENUM_USE_STD_MODULE
macro, standard library header inclusions are skipped, and it usesimport std;
instead. It prevents multiple header compilation and improves the build time. This only affects to the codebase when user usemagic_enum.cppm
module and declare the macro. Similar structure to argparse.cppm. - Export
std::formatter
template specialization, which was missing in PR #343.
Fix: Commit a3934f7
- Move
magic_enum.cppm
module file tomodule
directory, since module is not header file and doesn't match to the meaning ofinclude
.