id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 7679,unhex level 4 compile warning in visual studio,Gary Sanders ,Marshall Clow," The following code generates a level 4 compiler warning in Visual Studio 2010 and 2012: {{{ #include #include int main() { std::string base = ""now is the time""; std::string hstr = boost::algorithm::hex(base); std::string cstr = boost::algorithm::unhex(hstr); } }}} The warnings are: {{{ 1>d:\development\libs\boost_1_52_0\boost/algorithm/hex.hpp(137): warning C4244: '=' : conversion from 'unsigned int' to 'T', possible loss of data 1> d:\development\libs\boost_1_52_0\boost/algorithm/hex.hpp(204) : see reference to function template instantiation 'std::back_insert_iterator<_Container> boost::algorithm::detail::decode_one(InputIterator &,InputIterator,OutputIterator,EndPred)' being compiled 1> with 1> [ 1> _Container=std::string, 1> InputIterator=std::_String_const_iterator,std::allocator>, 1> OutputIterator=std::back_insert_iterator, 1> Iterator=std::_String_const_iterator,std::allocator>, 1> EndPred=bool (__cdecl *)(std::_String_const_iterator,std::allocator>,std::_String_const_iterator,std::allocator>) 1> ] 1> d:\development\libs\boost_1_52_0\boost/algorithm/hex.hpp(237) : see reference to function template instantiation 'OutputIterator boost::algorithm::unhex,OutputIterator>(InputIterator,InputIterator,OutputIterator)' being compiled 1> with 1> [ 1> OutputIterator=std::back_insert_iterator, 1> _Elem=char, 1> _Traits=std::char_traits, 1> _Alloc=std::allocator, 1> InputIterator=std::_String_const_iterator,std::allocator> 1> ] 1> d:\development\libs\boost_1_52_0\boost/algorithm/hex.hpp(263) : see reference to function template instantiation 'OutputIterator boost::algorithm::unhex>(const Range &,OutputIterator)' being compiled 1> with 1> [ 1> OutputIterator=std::back_insert_iterator, 1> String=std::string, 1> _Container=std::string, 1> Range=std::string 1> ] 1> unhex_bug.cpp(10) : see reference to function template instantiation 'String boost::algorithm::unhex(const String &)' being compiled 1> with 1> [ 1> String=std::string 1> ] }}} ",Bugs,new,To Be Determined,algorithm,Boost 1.52.0,Problem,,unhex,