mardi 18 juin 2019

Failed overload resolution during pack expansion

while I was trying to make some adaptations in my code, I encountered a problem with pack expansion, where theoretically it should compile.

Source.cpp(20,2): error C2672:  'ExpandArgs': no matching overloaded function found
Source.cpp(17): message :  see reference to function template instantiation 'void `anonymous-namespace'::ExpandArgs<const char(&)[9],>(boost::log::v2s_mt_nt6::record_ostream &,Arg)' being compiled
Source.cpp(17): message :         with
Source.cpp(17): message :         [
Source.cpp(17): message :             Arg=const char (&)[9]
Source.cpp(17): message :         ]
Source.cpp(54): message :  see reference to function template instantiation 'void `anonymous-namespace'::ExpandArgs<const char(&)[9],std::string&>(boost::log::v2s_mt_nt6::record_ostream &,Arg,std::string &)' being compiled
Source.cpp(54): message :         with
Source.cpp(54): message :         [
Source.cpp(54): message :             Arg=const char (&)[9]
Source.cpp(54): message :         ]
Source.cpp(77): message :  see reference to function template instantiation 'void CustomLogger::Log<boost::log::v2s_mt_nt6::sources::logger_mt,const char(&)[9],std::string&>(Logger &,const char (&)[9],std::string &)' being compiled
Source.cpp(77): message :         with
Source.cpp(77): message :         [
Source.cpp(77): message :             Logger=boost::log::v2s_mt_nt6::sources::logger_mt
Source.cpp(77): message :         ]
Source.cpp(88): message :  see reference to function template instantiation 'void sA::Log<const char(&)[9],std::string&>(const char (&)[9],std::string &)' being compiled
Source.cpp(17,1): error C2780:  'void `anonymous-namespace'::ExpandArgs(boost::log::v2s_mt_nt6::record_ostream &,Arg &&,Args &&...)': expects 3 arguments - 1 provided
Source.cpp(16): message :  see declaration of '`anonymous-namespace'::ExpandArgs'

Code: Link to code

I are using Visual Studio 2019 (v142) SDK Version: 10.0.18362.0

Can anyone see the problem? Can be a compiler error?

Aucun commentaire:

Enregistrer un commentaire