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 | ||||
0000714 | [uClibc++] Other | major | always | 02-10-06 01:05 | 05-29-07 17:20 | ||||
Reporter | faye2040 | View Status | public | ||||||
Assigned To | gkajmowi | ||||||||
Priority | normal | Resolution | unable to reproduce | ||||||
Status | closed | Product Version | 0.2.0 | ||||||
Summary | 0000714: Wrong construction in <utility> for map instantiation | ||||||||
Description |
Here is my a-little-complicate sample: #include <map> using namespace std; class A { public: A(const char *n): name(n) {} A(const A& a): name(a.name) {} private: const char *name; }; template <typename _T> struct tS { typedef bool (_T::*fn)(void); typedef map<A, fn> tSfn; void slot(const A& a, fn f) { mp[a] = f; } private: tSfn mp; }; template <typename _T> struct tU { typedef map<A, tS<_T> > tUtS; void slot(const A& a, tS<_T>& m) { mm[a] = m; } private: tUtS mm; }; struct B { bool bb1(void) {} bool bb2(void) {} tS bMP; tU bMM; }; int main() { A a1("a1"), a2("a2"), a3("a3"); B b; b.bMP.slot(a1, &B::bb1); b.bMP.slot(a2, &B::bb2); b.bMM.slot(a3, b.bMP); } |
||||||||
Additional Information |
The compiling result via MIPS toolchain: (See the final error reported) In file included from test.cpp:1: uClibc++/include/map:130: warning: `typename std::__base_map<Key, T, Compare, Allocator>::iterator' is implicitly a typename uClibc++/include/map:130: warning: implicit typename is deprecated, please see the documentation for details uClibc++/include/map:198: warning: `typename std::__base_map<Key, T, Compare, Allocator>::const_iterator' is implicitly a typename uClibc++/include/map:198: warning: implicit typename is deprecated, please see the documentation for details uClibc++/include/map:529: warning: `typename std::__base_map<Key, T, Compare, Allocator>::iterator' is implicitly a typename uClibc++/include/map:529: warning: implicit typename is deprecated, please see the documentation for details uClibc++/include/map:530: warning: `typename std::__base_map<Key, T, Compare, Allocator>::const_iterator' is implicitly a typename uClibc++/include/map:530: warning: implicit typename is deprecated, please see the documentation for details uClibc++/include/map:853: warning: `typename std::__base_map<Key, T, Compare, Allocator>::iterator' is implicitly a typename uClibc++/include/map:853: warning: implicit typename is deprecated, please see the documentation for details uClibc++/include/map:854: warning: `typename std::__base_map<Key, T, Compare, Allocator>::const_iterator' is implicitly a typename uClibc++/include/map:854: warning: implicit typename is deprecated, please see the documentation for details uClibc++/include/functional: In member function `bool std::less<T>::operator()(const T&, const T&) const [with T = A]': uClibc++/include/map:586: instantiated from `std::pair<std::__base_map<Key, T, Compare, Allocator>::iterator, bool> std::map<Key, T, Compare, Allocator>::insert(std::__base_map<Key, T, Compare, Allocator>::value_type&) [with Key = A, T = bool (B::*)(), Compare = std::less<A>, Allocator = std::allocator<bool (B::*)()>]' uClibc++/include/map:576: instantiated from `std::__base_map<Key, T, Compare, Allocator>::reference std::map<Key, T, Compare, Allocator>::operator[](std::__base_map<Key, T, Compare, Allocator>::key_type&) [with Key = A, T = bool (B::*)(), Compare = std::less<A>, Allocator = std::allocator<bool (B::*)()>]' test.cpp:18: instantiated from `void tS<_T>::slot(const A&, bool (_T::*)()) [with _T = B]' test.cpp:45: instantiated from here uClibc++/include/functional:145: no match for `const A& < const A&' operator uClibc++/include/utility: In constructor `std::pair<T1, T2>::pair() [with T1 = A, T2 = bool (B::*)()]': uClibc++/include/deque:437: instantiated from `std::deque<T, Allocator>& std::deque<T, Allocator>::operator=(const std::deque<T, Allocator>&) [with T = std::pair<A, bool (B::*)()>, Allocator = std::allocator<std::pair<A, bool (B::*)()> >]' uClibc++/include/map:557: instantiated from `std::map<Key, T, Compare, Allocator>& std::map<Key, T, Compare, Allocator>::operator=(const std::map<Key, T, Compare, Allocator>&) [with Key = A, T = bool (B::*)(), Compare = std::less<A>, Allocator = std::allocator<bool (B::*)()>]' test.cpp:27: instantiated from `void tU<_T>::slot(const A&, tS<_T>&) [with _T = B]' test.cpp:47: instantiated from here uClibc++/include/utility:55: no matching function for call to `A::A()' test.cpp:5: candidates are: A::A(const A&) test.cpp:7: A::A(const char*) |
||||||||
Attached Files | |||||||||
|
Copyright © 2000 - 2006 Mantis Group |