diff --git a/src/main.cpp b/src/main.cpp index c6f2e62..01ad3e1 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -87,14 +87,14 @@ struct BoltErrorCategory : std::error_category { const BoltErrorCategory boltCategory {}; -std::error_code make_error_code(BoltErrc errc) { - return { static_cast(errc), boltCategory }; -} - namespace std { template <> struct is_error_code_enum : true_type {}; + std::error_code make_error_code(BoltErrc errc) { + return { static_cast(errc), boltCategory }; + } + /// Custom formatter for std::error_code. As far as I know, this is /// Not going to be added in C++23, despite the fact fmt already has a specialization for it, /// so I have to implement one myself. At least it's not that awful to. @@ -140,7 +140,7 @@ struct BoltReader { lib = std::bit_cast(boltFile.GetMapping()); if(!lib->Validate()) - return make_error_code(BoltErrc::InvalidMagic); + return std::make_error_code(BoltErrc::InvalidMagic); auto p = path; p.replace_filename("SLUS_201.14");