Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- In file included from foo.cpp:1:
- In file included from /usr/include/c++/4.2.1/algorithm:64:
- /usr/include/c++/4.2.1/bits/stl_algobase.h:283:18: error: no viable overloaded
- '='
- *__result = *__first;
- ~~~~~~~~~ ^ ~~~~~~~~
- /usr/include/c++/4.2.1/bits/stl_algobase.h:315:14: note: in instantiation of
- function template specialization 'std::__copy<false,
- std::random_access_iterator_tag>::copy<unsigned long *,
- std::back_insert_iterator<std::vector<std::basic_string<char>,
- std::allocator<std::basic_string<char>>>> >' requested here
- return std::__copy<__simple, _Category>::copy(__first, __last, __result);
- ^
- /usr/include/c++/4.2.1/bits/stl_algobase.h:349:18: note: in instantiation of
- function template specialization 'std::__copy_aux<unsigned long *,
- std::back_insert_iterator<std::vector<std::basic_string<char>,
- std::allocator<std::basic_string<char>>>> >' requested here
- { return std::__copy_aux(__first.base(), __last.base(), __result); }
- ^
- /usr/include/c++/4.2.1/bits/stl_algobase.h:400:15: note: in instantiation of
- function template specialization 'std::__copy_normal<true,
- false>::__copy_n<__gnu_cxx::__normal_iterator<unsigned long *,
- std::vector<unsigned long, std::allocator<unsigned long>>>,
- std::back_insert_iterator<std::vector<std::basic_string<char>,
- std::allocator<std::basic_string<char>>>> >' requested here
- return std::__copy_normal<__in, __out>::__copy_n(__first, __last,
- ^
- foo.cpp:12:3: note: in instantiation of function template specialization
- 'std::copy<__gnu_cxx::__normal_iterator<unsigned long *,
- std::vector<unsigned long, std::allocator<unsigned long>>>,
- std::back_insert_iterator<std::vector<std::basic_string<char>,
- std::allocator<std::basic_string<char>>>> >' requested here
- std::copy(foo.begin(), foo.end(), std::back_inserter(bar));
- ^
- /usr/include/c++/4.2.1/bits/stl_iterator.h:385:11: note: candidate function (the
- implicit copy assignment operator) not viable: no known conversion from
- 'unsigned long' to 'const
- std::back_insert_iterator<std::vector<std::basic_string<char>,
- std::allocator<std::basic_string<char>>>>' for 1st argument;
- class back_insert_iterator
- ^
- /usr/include/c++/4.2.1/bits/stl_iterator.h:411:7: note: candidate function not
- viable: no known conversion from 'unsigned long' to 'const
- std::basic_string<char>' for 1st argument;
- operator=(typename _Container::const_reference __value)
- ^
- 1 error generated.
Advertisement
Add Comment
Please, Sign In to add comment