#2311 closed Feature Requests (fixed)
any::operator= should have by-value argument
Reported by: | niels_dekker | Owned by: | nasonov |
---|---|---|---|
Milestone: | Boost 1.38.0 | Component: | any |
Version: | Boost 1.36.0 | Severity: | Problem |
Keywords: | Cc: | niels_dekker |
Description
When a copy assignment operator is implemented simply by doing copy-and-swap, it should pass its argument by value, instead of doing the copy inside the body of the function, to allow the compiler to do copy elision. As was discussed at the Boost developer mailing list, Improving the assignment operators of various Boost types.
So please consider the attached patch.
Attachments (1)
Change History (6)
by , 14 years ago
Attachment: | any_assignment.patch added |
---|
comment:1 by , 14 years ago
Type: | Bugs → Feature Requests |
---|
comment:2 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 by , 14 years ago
Milestone: | Boost 1.37.0 → Boost 1.38.0 |
---|
comment:5 by , 14 years ago
Thank you very much, Alexander! I just double-checked, it looks fine to me.
Note:
See TracTickets
for help on using tickets.
This is not a bug, this is a feature request.