Bug 534

Summary: non-const Ptr<T>::operator * () returns const reference
Product: ns-3 Reporter: Nicola Baldo <nicola>
Component: coreAssignee: ns-bugs <ns-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: mathieu.lacage
Priority: P5 Keywords: bug
Version: ns-3-dev   
Hardware: PC   
OS: Linux   
Attachments: program reproducing the bug
fix

Description Nicola Baldo 2009-03-27 08:08:45 EDT
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
Comment 1 Nicola Baldo 2009-03-27 08:09:41 EDT
Created attachment 405 [details]
fix
Comment 2 Mathieu Lacage 2009-04-16 07:20:44 EDT
I can't find any good reason to refuse this patch so, let's merge this.
Comment 3 Mathieu Lacage 2009-04-16 07:32:12 EDT
changeset e7873b6d3f5e