Bugzilla – Bug 534
non-const Ptr<T>::operator * () returns const reference
Last modified: 2009-04-16 07:32:12 UTC
Created attachment 404 [details] program reproducing the bug non-const Ptr<T>::operator * () returns const reference. This cause compilation of the attached program to fail with the following errors: ../scratch/ptr-dereference-and-assign.cc: In function ‘int main(int, char**)’: ../scratch/ptr-dereference-and-assign.cc:38: error: passing ‘const One’ as ‘this’ argument of ‘One& One::operator=(const One&)’ discards qualifiers ../scratch/ptr-dereference-and-assign.cc:48: error: passing ‘const Two’ as ‘this’ argument of ‘Two& Two::operator=(const Two&)’ discards qualifiers
Created attachment 405 [details] fix
I can't find any good reason to refuse this patch so, let's merge this.
changeset e7873b6d3f5e