|
|
От: |
igna
|
|
| Дата: | 19.08.08 09:26 | ||
| Оценка: | |||
#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());
}