天天看點

解決“std::Copy_impl”報錯問題

        在VS2013+Boost程式設計時常出現"std::Copy_impl"報錯問題,出現該問題的原因是VS2013把Copy裡參數轉化警告warning 4996提升為error了,隻需要*.cpp裡屏蔽掉這個warnning,如下:

//conHello2.cpp

#if defined(_MSC_VER) && _MSC_VER >= 1400 
#pragma warning(push) 
#pragma warning(disable:4996) 
#endif 


#include <iostream>
#include <vector>
#include <algorithm>

#include <boost/bind.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/regex.hpp>
#include <clocale>
           

繼續閱讀