1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
| $ clang++ -std=c++11 -Wall -Wextra -Werror -O2 -g test.cpp -o test.bin
In file included from test.cpp:2:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/iostream:39:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/ostream:38:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/ios:40:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/char_traits.h:39:
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/stl_algobase.h:336:18: error:
no viable overloaded '='
*__result = *__first;
~~~~~~~~~ ^ ~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/stl_algobase.h:396:36: note:
in instantiation of function template specialization
'std::__copy_move<false, false,
std::random_access_iterator_tag>::__copy_m<std::basic_string<char> *,
std::back_insert_iterator<std::basic_string<char> > >' requested here
_Category>::__copy_m(__first, __last, __result);
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/stl_algobase.h:432:23: note:
in instantiation of function template specialization
'std::__copy_move_a<false, std::basic_string<char> *,
std::back_insert_iterator<std::basic_string<char> > >' requested here
return _OI(std::__copy_move_a<_IsMove>(std::__niter_base(__first),
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/stl_algobase.h:464:20: note:
in instantiation of function template specialization
'std::__copy_move_a2<false,
__gnu_cxx::__normal_iterator<std::basic_string<char> *,
std::vector<std::basic_string<char>,
std::allocator<std::basic_string<char> > > >,
std::back_insert_iterator<std::basic_string<char> > >' requested here
return (std::__copy_move_a2<__is_move_iterator<_II>::__value>
^
test.cpp:11:7: note: in instantiation of function template specialization
'std::copy<__gnu_cxx::__normal_iterator<std::basic_string<char> *,
std::vector<std::basic_string<char>,
std::allocator<std::basic_string<char> > > >,
std::back_insert_iterator<std::basic_string<char> > >' requested here
std::copy(vector.begin(), vector.end(), std::back_inserter(result));
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/stl_iterator.h:403:11: note:
candidate function (the implicit copy assignment operator) not viable: no
known conversion from 'std::basic_string<char>' to 'const
std::back_insert_iterator<std::basic_string<char> >' for 1st argument
class back_insert_iterator
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/stl_iterator.h:403:11: note:
candidate function (the implicit move assignment operator) not viable: no
known conversion from 'std::basic_string<char>' to
'std::back_insert_iterator<std::basic_string<char> >' for 1st argument
class back_insert_iterator
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/stl_iterator.h:437:7: note:
candidate function not viable: no known conversion from
'std::basic_string<char>' to 'const typename
basic_string<char>::value_type' (aka 'const char') for 1st argument
operator=(const typename _Container::value_type& __value)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/bits/stl_iterator.h:444:7: note:
candidate function not viable: no known conversion from
'std::basic_string<char>' to 'typename basic_string<char>::value_type'
(aka 'char') for 1st argument
operator=(typename _Container::value_type&& __value)
^
1 error generated. |
Partager