[ET Trac] [Einstein Toolkit] #1521: Piraha smart_ptr can't handle self assignment
Einstein Toolkit
trac-noreply at einsteintoolkit.org
Wed Jan 15 23:37:20 CST 2014
#1521: Piraha smart_ptr can't handle self assignment
----------------------+-----------------------------------------------------
Reporter: eschnett | Owner:
Type: defect | Status: new
Priority: major | Milestone:
Component: Cactus | Version: development version
Keywords: |
----------------------+-----------------------------------------------------
An assignment of the form
{{{
void foo(smart_ptr<T> x) {
x = x;
}
}}}
will not work, since operator= assumes that LHS and RHS are different
objects. The usual remedy is to add an if statement, doing nothing for
self assignment.
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1521>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
More information about the Trac
mailing list