【发布时间】:2021-07-05 23:42:47
【问题描述】:
我正在努力:
fmt::print(fg(fmt::color::red), "A critical error has occured. consult the logs and fix the issue! {0}", std::endl);
这会导致错误消息:Error C2661 'fmt::v7::print': no overloaded function takes 3 arguments。
查看官方文档here 将fmt::print 显示为:
template <typename S, typename... Args>
void fmt::print(const text_style &ts, const S &format_str, const Args&... args)
这表明参数的数量不应该是一个问题,事实上,它不是。如果我将 std::endl 替换为像 1 这样随机的东西,它编译和构建就好了!这里有什么问题?
【问题讨论】: