I'm using Boost 1.73 on a older project which was using Boost 1.48. My intention is to fix any warnings and errors along the way.
When compiling the project I'm getting some odd messages which are not in the source of the project but in boost itself, these messages are like most error messages, cryptic and not terribly helpful.
1>debugengine.cpp
1>c:\program files (x86)\microsoft visual studio\2017\professional\vc\tools\msvc\14.16.27023\include\utility(173): warning C4244: 'initializing': conversion from '_Ty' to '_Ty2', possible loss of data
1> with
1> [
1> _Ty=int
1> ]
1> and
1> [
1> _Ty2=unsigned short
1> ]
1>c:\boost\boost_1_73_0\boost\date_time\date_parsing.hpp(111): note: see reference to function template instantiation 'std::pair<const _Kty,_Ty>::pair<const char(&)[4],int,0>(_Other1,_Other2 &&) noexcept(false)' being compiled
1> with
1> [
1> _Kty=std::string,
1> _Ty=unsigned short,
1> _Other1=const char (&)[4],
1> _Other2=int
1> ]
1>c:\boost\boost_1_73_0\boost\date_time\date_parsing.hpp(99): note: see reference to function template instantiation 'std::pair<const _Kty,_Ty>::pair<const char(&)[4],int,0>(_Other1,_Other2 &&) noexcept(false)' being compiled
1> with
1> [
1> _Kty=std::string,
1> _Ty=unsigned short,
1> _Other1=const char (&)[4],
1> _Other2=int
1> ]
1>c:\boost\boost_1_73_0\boost\date_time\date_parsing.hpp(168): note: see reference to function template instantiation 'unsigned short boost::date_time::month_str_to_ushort<month_type>(const std::string &)' being compiled
1>c:\boost\boost_1_73_0\boost\date_time\gregorian\parsers.hpp(49): note: see reference to function template instantiation 'date_type boost::date_time::parse_date<boost::gregorian::date>(const std::string &,int)' being compiled
1> with
1> [
1> date_type=boost::gregorian::date
1> ]
1>c:\boost\boost_1_73_0\boost\bind\placeholders.hpp(54): note: see reference to class template instantiation 'boost::arg<9>' being compiled
1>c:\boost\boost_1_73_0\boost\bind\placeholders.hpp(53): note: see reference to class template instantiation 'boost::arg<8>' being compiled
1>c:\boost\boost_1_73_0\boost\bind\placeholders.hpp(52): note: see reference to class template instantiation 'boost::arg<7>' being compiled
1>c:\boost\boost_1_73_0\boost\bind\placeholders.hpp(51): note: see reference to class template instantiation 'boost::arg<6>' being compiled
1>c:\boost\boost_1_73_0\boost\bind\placeholders.hpp(50): note: see reference to class template instantiation 'boost::arg<5>' being compiled
1>c:\boost\boost_1_73_0\boost\bind\placeholders.hpp(49): note: see reference to class template instantiation 'boost::arg<4>' being compiled
1>c:\boost\boost_1_73_0\boost\bind\placeholders.hpp(48): note: see reference to class template instantiation 'boost::arg<3>' being compiled
1>c:\boost\boost_1_73_0\boost\bind\placeholders.hpp(47): note: see reference to class template instantiation 'boost::arg<2>' being compiled
1>c:\boost\boost_1_73_0\boost\bind\placeholders.hpp(46): note: see reference to class template instantiation 'boost::arg<1>' being compiled
Is there anything I can do?
I'm using MSVC 2017.
I've narrowed the problem down to just one file and commented out everything except:
#include <boost/date_time.hpp>
This is what I get when compiling just this:
1>------ Build started: Project: Debug Service Group, Configuration: Debug Win32 ------
1>debugengine.cpp
1>c:\program files (x86)\microsoft visual studio\2017\professional\vc\tools\msvc\14.16.27023\include\utility(173): warning C4244: 'initializing': conversion from '_Ty' to '_Ty2', possible loss of data
1> with
1> [
1> _Ty=int
1> ]
1> and
1> [
1> _Ty2=unsigned short
1> ]
1>c:\boost\boost_1_73_0\boost\date_time\date_parsing.hpp(111): note: see reference to function template instantiation 'std::pair<const _Kty,_Ty>::pair<const char(&)[4],int,0>(_Other1,_Other2 &&) noexcept(false)' being compiled
1> with
1> [
1> _Kty=std::string,
1> _Ty=unsigned short,
1> _Other1=const char (&)[4],
1> _Other2=int
1> ]
1>c:\boost\boost_1_73_0\boost\date_time\date_parsing.hpp(99): note: see reference to function template instantiation 'std::pair<const _Kty,_Ty>::pair<const char(&)[4],int,0>(_Other1,_Other2 &&) noexcept(false)' being compiled
1> with
1> [
1> _Kty=std::string,
1> _Ty=unsigned short,
1> _Other1=const char (&)[4],
1> _Other2=int
1> ]
1>c:\boost\boost_1_73_0\boost\date_time\date_parsing.hpp(168): note: see reference to function template instantiation 'unsigned short boost::date_time::month_str_to_ushort<month_type>(const std::string &)' being compiled
1>c:\boost\boost_1_73_0\boost\date_time\gregorian\parsers.hpp(49): note: see reference to function template instantiation 'date_type boost::date_time::parse_date<boost::gregorian::date>(const std::string &,int)' being compiled
1> with
1> [
1> date_type=boost::gregorian::date
1> ]
1>Done building project "Debug Service Group.vcxproj".
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Aucun commentaire:
Enregistrer un commentaire