Как без использования #pragma warning изменить нижеприведенный пример, чтобы избавиться от предупреждения?
#include <algorithm>
#include <list>
#include <vector>
using namespace std;
template <class CONT, class FI>
bool my_copy(CONT const& source, FI first, FI last)
{
if (source.size() > last - first) // VC++ 9.0 - warning C4018: '>' : signed/unsigned mismatch
return false;
copy(source.begin(), source.end(), first);
return true;
}
int main()
{
list<int> l;
vector<int> v;
my_copy(l, v.begin(), v.end());
}