id summary reporter owner description type status milestone component version severity resolution keywords cc 9503 Compile error C4996 with boost::uuids:uuid and vc2012 Craig Hutchinson Andy Tompkins "When compiling uuid under vc2012 with safe check enabled the C4996 warning is escalated to ERROR status. {{{ c:\program files (x86)\microsoft visual studio 11.0\vc\include\algorithm(965): error C4996: 'std::_Swap_ranges': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators' 1> c:\program files (x86)\microsoft visual studio 11.0\vc\include\algorithm(950) : see declaration of 'std::_Swap_ranges' 1> c:\boost\boost_1_55_0\boost\uuid\uuid.hpp(151) : see reference to function template instantiation '_FwdIt2 std::swap_ranges(_FwdIt1,_FwdIt1,_FwdIt2)' being compiled 1> with 1> [ 1> _FwdIt2=boost::uuids::uuid::iterator, 1> _FwdIt1=boost::uuids::uuid::iterator 1> ] }}} The pragma that already exists in boost_1_55_0\boost\uuid\uuid.hpp does not cater for this: {{{ #pragma warning(disable : 4996) }}} I have attached a modified uuid which uses std::array as a sensible solution - this was actually commented in the original code. Now this enables safe iterators for compiler checks to be performed and removed any need for the #pragma pre-processor directives. There may be other changes needed elsewhere(i.e. &*uuid.begin() in functions needing void*)." Patches closed To Be Determined uuid Boost 1.55.0 Problem wontfix C4996 vc2012