Closed
Description
Currently I'm upgrading fmt 3.0.1 used by TrinityCore to version 4.0.0 and it seems
like the following error got introduced when using enums with an underlying type (of probably std::uint8_t):
enum SpellEffIndex : uint8 {
EFFECT_0 = 0,
EFFECT_1 = 1,
EFFECT_2 = 2
};
int main() {
fmt::sprintf("%u", EFFECT_0);
}
Note: the error was not reproducible when using MSVC 2017.
/home/travis/build/Naios/TrinityCore/dep/fmt/fmt/format.h:2332:20: fatal error: ambiguous conversion for functional-style cast from 'const SpellEffIndex' to 'MakeValue<fmt::BasicFormatter<char, fmt::ArgFormatter<char> > >'
Value result = MakeValue<Formatter>(value);
^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/travis/build/Naios/TrinityCore/dep/fmt/fmt/printf.h:546:1: note: in instantiation of function template specialization 'fmt::internal::ArgArray<7, true>::make<fmt::BasicFormatter<char, fmt::ArgFormatter<char> >, SpellEffIndex>' requested here
FMT_VARIADIC(std::string, sprintf, CStringRef)
^
/home/travis/build/Naios/TrinityCore/dep/fmt/fmt/format.h:3662:3: note: expanded from macro 'FMT_VARIADIC'
FMT_VARIADIC_(char, ReturnType, func, return func, __VA_ARGS__)
Metadata
Assignees
Labels
No labels
Activity