Opened 15 years ago

Closed 15 years ago

#1420 closed Patches (fixed)

optional_base::operator=() optimization

Reported by: rick68@… Owned by: Fernando Cacciola
Milestone: Boost 1.35.0 Component: optional
Version: Boost 1.34.1 Severity: Optimization
Keywords: Cc: fernando_cacciola@…

Description

Hi,

A a1;
boost::optional<A> opt1(a1);
boost::optional<A> opt2;
opt2 = opt1;

the operator=() will call to assign(optional<U> const& rsh), not assign(optional_base const& rsh).

Attachments (2)

boost_1_34_1_optional.diff (428 bytes ) - added by rick68@… 15 years ago.
patch optional<T>::operator=.
test-code.cpp (529 bytes ) - added by rick68@… 15 years ago.
test-code.cpp

Download all attachments as: .zip

Change History (3)

by rick68@…, 15 years ago

Attachment: boost_1_34_1_optional.diff added

patch optional<T>::operator=.

by rick68@…, 15 years ago

Attachment: test-code.cpp added

test-code.cpp

comment:1 by Fernando Cacciola, 15 years ago

Milestone: To Be DeterminedBoost 1.35.0
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.