Anonymous | Login | Signup for a new account | 11-10-2008 11:07 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 | |||||||
0001065 | [uClibc++] Other | major | always | 10-05-06 02:41 | 05-29-07 17:17 | |||||||
Reporter | peter_schueller | View Status | public | |||||||||
Assigned To | gkajmowi | |||||||||||
Priority | normal | Resolution | open | |||||||||
Status | assigned | Product Version | 0.2.0 | |||||||||
Summary | 0001065: map comparison operator does not work | |||||||||||
Description |
the map comparison operator== returns true if x.c == y.c && x.data = y.data. the "=" is obviously a typo and should be == x.c is less<Key> per default, but neither less<T> nor binary_function<T> defines the operator==, also, for the contents of the map the comparison operator does not matter. also, the map comparison operator== is not declared friend of the map class so it is not allowed to access c and data. i have included a patch below which makes the operator work for me |
|||||||||||
Additional Information |
@Index: include/map =================================================================== --- include/map (revision 1475) +++ include/map (working copy) @ -532,6 +532,8 @@ using base::data; using base::c; + template <class _Key, class _T, class _Compare, class _Allocator> friend bool + operator==(const map<_Key,_T,_Compare,_Allocator>& x, const map<_Key,_T,_Compare,_Allocator>& y); }; @@ -778,7 +780,7 @@ template <class Key, class T, class Compare, class Allocator> bool operator== (const map<Key,T,Compare,Allocator>& x, const map<Key,T,Compare,Allocator>& y) { - if(x.c == y.c && x.data = y.data){ + if(x.data == y.data){ return true; } return false; |
|||||||||||
Attached Files | ||||||||||||
|
Copyright © 2000 - 2006 Mantis Group |