首页 > 解决方案 > fmt VS2019 警告,我需要关心什么?

问题描述

在带有 VS2019 的 Windows 上使用 fmt 7.1.3(x86 为 19.28.29914)

pTmp=fmt::format_to(dbuf, (fmtFlags & F_SHORT) ? "{:04d}{:02d}{:02d}" : "{:04d}-{:02d}-{:02d}",
                    dt.year <10000 ? dt.year : dt.year %10000,
                    dt.month,
                    dt.day);
*pTmp='\0';

导致这条著名的消息:

C:\dev\gi2\strangers\fmt\include\fmt\format.h(2630): 警告 C4582: 'fmt::v7::detail::arg_ref::value with [Char=char]::name':构造函数未隐式调用 C:\dev\gi2\strangers\fmt\include\fmt\format.h(2630): 注意:编译类模板成员函数 'fmt::v7::detail::arg_ref::value: :value(int) with [Char=char]' C:\dev\gi2\strangers\fmt\include\fmt\format.h(2615): 注意:参见函数模板实例化 'fmt::v7::detail ::arg_ref::value::value(int) 与 [Char=char]' 正在编译 C:\dev\gi2\strangers\fmt\include\fmt\format.h(2635):注意:参见类模板的参考实例化 'fmt::v7::detail::arg_ref::value with [Char=char]' 正在编译 C:\dev\gi2\strangers\fmt\include\fmt\format.h(2643): 注意:见参考到类模板实例化'fmt::v7::detail::arg_ref 与 [Char=char]' 正在编译 C:\dev\gi2\strangers\fmt\include\fmt\format.h(3622): 注意:参见类模板实例化 'fmt::v7::detail:: dynamic_format_specs' 正在编译 C:\dev\gi2\strangers\fmt\include\fmt\format.h(3161): 注意:在评估 constexpr 函数 'fmt::v7::detail::parse_format_specs' C:\dev\gi2 \strangers\fmt\include\fmt\format.h(2975):注意:在评估 constexpr 函数 ::v7::detail::format_string_checkergiTimeStamp::getDateTime::<lambda_aeb89e23de062243f50ac9e48f895886::()::FMT_COMPILE_STRING::char_type,fmt ::v7::detail::error_handler,unsigned int>::on_format_specs' C:\dev\gi2\strangers\fmt\include\fmt\format.h(2997):注意:在评估 constexpr 函数时 'fmt::v7 ::detail::parse_replacement_field' C:\dev\gi2\strangers\fmt\include\fmt\format.h(3228):注意:在评估 constexpr 函数 'fmt::v7::detail::parse_format_string' C:\dev\gi2\strangers\fmt\include\fmt\core.h(1619) 时:注意:参见对函数模板实例化的参考 'void fmt::v7::detail::check_format_string<giULONG&,S,0>(S) 与 [S=giTimeStamp::getDateTime::<lambda_aeb89e23de062243f50ac9e48f895886>::()::FMT_COMPILE_STRING]' 正在编译 C:\dev\gi2 \strangers\fmt\include\fmt\core.h(2003): 注意:参见函数模板实例化 'fmt::v7::format_arg_storefmt::v7::basic_format_context<fmt::v7::detail::buffer_appender< char,char>,unsigned int> fmt::v7::make_args_checked<giULONG&,S,char>(const S &,const unsigned int &) with [S=giTimeStamp::getDateTime::<lambda_aeb89e23de062243f50ac9e48f895886>::(): :FMT_COMPILE_STRING]' 正在编译 C:/dev/gi2/gi2cl/giOsal/src/giTimeStamp.cpp(1080):注意:参见函数模板实例化'charfmt::v7::format_to<char ,giTimeStamp::getDateTime::<lambda_aeb89e23de062243f50ac9e48f895886>::()::FMT_COMPILE_STRING,giULONG&,true>(OutputIt,const S &,giULONG &) 与 [OutputIt=char *, S= giTimeStamp::getDateTime::<lambda_aeb89e23de062243f50ac9e48f895886>::()::FMT_COMPILE_STRING]' 正在编译

这是我可以忽略的吗?

谢谢

标签: c++fmt

解决方案


推荐阅读