Created
January 15, 2013 07:53
-
-
Save thomaslee/4537023 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tom@laptop:~/Source/chimp$ g++ -o foo foo.cc | |
foo.cc: In function ‘int main(int, char**)’: | |
foo.cc:36:32: error: no match for ‘operator=’ in ‘f.std::map<_Key, _Tp, _Compare, _Alloc>::operator[]<std::basic_string<char>, std::unary_function<const some_arg_t&, int>, std::less<std::basic_string<char> >, std::allocator<std::pair<const std::basic_string<char>, std::unary_function<const some_arg_t&, int> > > >((* & std::basic_string<char>(((const char*)"a"), (*(const std::allocator<char>*)(& std::allocator<char>()))))) = std::ptr_fun<some_arg_t, int>(do_a)’ | |
foo.cc:36:32: note: candidate is: | |
In file included from /usr/include/c++/4.7/string:50:0, | |
from /usr/include/c++/4.7/bits/locale_classes.h:42, | |
from /usr/include/c++/4.7/bits/ios_base.h:43, | |
from /usr/include/c++/4.7/ios:43, | |
from /usr/include/c++/4.7/ostream:40, | |
from /usr/include/c++/4.7/iostream:40, | |
from foo.cc:1: | |
/usr/include/c++/4.7/bits/stl_function.h:103:12: note: std::unary_function<const some_arg_t&, int>& std::unary_function<const some_arg_t&, int>::operator=(const std::unary_function<const some_arg_t&, int>&) | |
/usr/include/c++/4.7/bits/stl_function.h:103:12: note: no known conversion for argument 1 from ‘std::pointer_to_unary_function<some_arg_t, int>’ to ‘const std::unary_function<const some_arg_t&, int>&’ | |
foo.cc:37:32: error: no match for ‘operator=’ in ‘f.std::map<_Key, _Tp, _Compare, _Alloc>::operator[]<std::basic_string<char>, std::unary_function<const some_arg_t&, int>, std::less<std::basic_string<char> >, std::allocator<std::pair<const std::basic_string<char>, std::unary_function<const some_arg_t&, int> > > >((* & std::basic_string<char>(((const char*)"b"), (*(const std::allocator<char>*)(& std::allocator<char>()))))) = std::ptr_fun<some_arg_t, int>(do_b)’ | |
foo.cc:37:32: note: candidate is: | |
In file included from /usr/include/c++/4.7/string:50:0, | |
from /usr/include/c++/4.7/bits/locale_classes.h:42, | |
from /usr/include/c++/4.7/bits/ios_base.h:43, | |
from /usr/include/c++/4.7/ios:43, | |
from /usr/include/c++/4.7/ostream:40, | |
from /usr/include/c++/4.7/iostream:40, | |
from foo.cc:1: | |
/usr/include/c++/4.7/bits/stl_function.h:103:12: note: std::unary_function<const some_arg_t&, int>& std::unary_function<const some_arg_t&, int>::operator=(const std::unary_function<const some_arg_t&, int>&) | |
/usr/include/c++/4.7/bits/stl_function.h:103:12: note: no known conversion for argument 1 from ‘std::pointer_to_unary_function<some_arg_t, int>’ to ‘const std::unary_function<const some_arg_t&, int>&’ | |
foo.cc:39:31: error: no match for call to ‘(std::map<std::basic_string<char>, std::unary_function<const some_arg_t&, int> >::mapped_type {aka std::unary_function<const some_arg_t&, int>}) (some_arg_t)’ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment