Anonymous | Login | Signup for a new account | 11-10-2008 10:57 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0000706 | [uClibc++] Other | major | always | 02-08-06 18:31 | 02-08-06 21:13 | ||||
Reporter | faye2040 | View Status | public | ||||||
Assigned To | gkajmowi | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | resolved | Product Version | 0.1.12 | ||||||
Summary | 0000706: compiling problem of bind2nd and mem_fun in uClibc++ | ||||||||
Description |
Dear Mr Garrett Kajmowicz Here is my sample c++ code: #include <cstring> #include <algorithm> #include <list> using namespace std; class A { public: A(const char *n): name(n) {} bool is(const char *n) const { return strcmp(n, name) == 0; } private: const char *name; }; typedef list<A *> aList; void main() { aList al; A a1("a1"), a2("a2"); al.push_back(&a1); al.push_back(&a2); const aList& l = al; aList::const_iterator f = find_if(l.begin(), l.end(), bind2nd(mem_fun(&A::is), "a3")); if (f != l.end()) return; } The error was reported by g++: ./include/functional: In function `std::binder2nd<Operation> std::bind2nd(const Operation&, const T&) [with Operation = std::mem_fun1_t<bool, const A, const char*>, T = char[3]]': test.cpp:32: instantiated from here ./include/functional:256: error: no matching function for call to `std::binder2nd<std::mem_fun1_t<bool, const A, const char*> >::binder2nd(const std::mem_fun1_t<bool, const A, const char*>&, const A*)' ./include/functional:241: note: candidates are: std::binder2nd<std::mem_fun1_t<bool, const A, const char*> >::binder2nd(const std::binder2nd<std::mem_fun1_t<bool, const A, const char*> >&) ./include/functional:246: note: std::binder2nd<Operation>::binder2nd(const Operation&, const typename Operation::second_argument_type&) [with Operation = std::mem_fun1_t<bool, const A, const char*>] Anthony Lee |
||||||||
Additional Information | |||||||||
Attached Files | |||||||||
|
Copyright © 2000 - 2006 Mantis Group |