id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 9621,dynamic_bitset.hpp MSVC compiler warning C4996 in call to std::fill_n,Drew Foster ,acharles,"When using the MSVC 12.0 compiler (and earlier versions) with dynamic_bitset, the following compiler warning is generated... 1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xutility(2715): warning C4996: 'std::_Fill_n': 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 12.0\VC\include\xutility(2701) : see declaration of 'std::_Fill_n' 1> d:\devel\drew.fosterTfs\3rdParty\Boost\1.54\main\dynamic_bitset\boost/dynamic_bitset/dynamic_bitset.hpp(810) : see reference to function template instantiation '_OutIt std::fill_n>::size_type,unsigned long>(_OutIt,_Diff,const _Ty &)' being compiled 1> with 1> [ 1> _OutIt=unsigned long * 1> , Block=unsigned long 1> , _Diff=boost::dynamic_bitset>::size_type 1> , _Ty=unsigned long 1> ] As noted in other threads (http://lists.boost.org/Archives/boost/2006/08/109338.php), this is a shortcoming of the Microsoft compiler. It can be easily fixed by modifying line 810 in dynamic_bitset.hpp to use an iterator for the first parameter instead of a raw pointer in the call to std::fill_n. - std::fill_n(b, div, static_cast(0)); + std::fill_n(m_bits.begin(), div, static_cast(0)); ",Bugs,closed,Boost 1.56.0,dynamic_bitset,Boost 1.54.0,Problem,fixed,,