Reference N3035 20.9.10.2.5 para 5.
Ensure all specializations are fixed.
This is what is there now:
void
reset(pointer __p = pointer())
{
if (__p != get())
{
get_deleter()(get());
std::get<0>(_M_t) = __p;
}
}
This is what it should be changed to:
void
reset(pointer __p = pointer())
{
pointer old_p = get();
if (__p != old_p)
{
std::get<0>(_M_t) = __p;
get_deleter()(old_p);
}
}
--
Summary: std::unique_ptr::reset() does not conform to N3035.
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tjgolubi at netins dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43183