|
Bugzilla – Full Text Bug Listing |
| Summary: | non-const Ptr<T>::operator * () returns const reference | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Nicola Baldo <nicola> |
| Component: | core | Assignee: | 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 |
||
Created attachment 405 [details]
fix
I can't find any good reason to refuse this patch so, let's merge this. changeset e7873b6d3f5e |
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