Он споткнул меня некоторое время, прежде чем я обнаружил проблемы Github с правильными ключевыми словами enum и компиляцией . Также проблемы GitHub не указывают версию в заголовке ..
Это определенное поведение для FMT V10+< /p>
#include
#include
#include
using Test = enum Test_e{
A,B,C
};
int main(int, char **)
{
fmt::print(std::cout, "test enum {}\n", A);
}
< /code>
Когда Libfmt обновлен до V10.0, после появления сообщений об ошибках. />[*]https://github.com/fmtlib/fmt/issues/3720
[*]https://github.com/fmtlib/fmt/issues/3671
ошибка msg for c+stri 11
msg for c+stri 11
msg for c+>In file included from :2:
/opt/compiler-explorer/libs/fmt/10.0.0/include/fmt/core.h: In instantiation of 'fmt::v10::detail::value fmt::v10::detail::make_value(T&&) [with Context = fmt::v10::basic_format_context; T = Test_e&]':
/opt/compiler-explorer/libs/fmt/10.0.0/include/fmt/core.h
/opt/compiler-explorer/libs/fmt/10.0.0/include/fmt/core.h
/opt/compiler-explorer/libs/fmt/10.0.0/include/fmt/core.h
/opt/compiler-explorer/libs/fmt/10.0.0/include/fmt/ostream.h:179:44: required from 'void fmt::v10::print(std::ostream&, format_string, T&& ...) [with T = {Test_e}; std::ostream = std::basic_ostream; format_string = basic_format_string]'
:10:15: required from here
/opt/compiler-explorer/libs/fmt/10.0.0/include/fmt/core.h
1691 | formattable,
| ^~~~~~~~~~~
/opt/compiler-explorer/libs/fmt/10.0.0/include/fmt/core.h
Compiler returned: 1
Подробнее здесь: https://stackoverflow.com/questions/777 ... -and-above