Opened 14 years ago

Closed 14 years ago

#2313 closed Bugs (fixed)

multi_index_container::operator= should have by-value argument

Reported by: niels_dekker Owned by: Joaquín M López Muñoz
Milestone: Boost 1.37.0 Component: multi_index
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)

multi_index_container_assignment.patch (623 bytes ) - added by niels_dekker 14 years ago.

Download all attachments as: .zip

Change History (3)

by niels_dekker, 14 years ago

comment:1 by Joaquín M López Muñoz, 14 years ago

Component: Nonemulti_index
Owner: set to Joaquín M López Muñoz

comment:2 by Joaquín M López Muñoz, 14 years ago

Resolution: fixed
Status: newclosed

(In [48728]) fixed #2313

Note: See TracTickets for help on using tickets.