When user declares MAGIC_ENUM_USE_STD_MODULE macro, standard library header inclusions are skipped, and it uses import std; instead. It prevents multiple header compilation and improves the build time. This only affects to the codebase when user use magic_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 to module directory, since module is not header file and doesn't match to the meaning of include.
This PR adds two functionalities:
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.std::formatter
template specialization, which was missing in PR #343.Fix: Commit
a3934f7
magic_enum.cppm
module file tomodule
directory, since module is not header file and doesn't match to the meaning ofinclude
.