This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/43183] std::unique_ptr::reset() does not conform to N3035.
- From: "jwakely dot gcc at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Mar 2010 16:35:11 -0000
- Subject: [Bug libstdc++/43183] std::unique_ptr::reset() does not conform to N3035.
- References: <bug-43183-18834@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from jwakely dot gcc at gmail dot com 2010-03-01 16:35 -------
Actually, we could just use pointer() everywhere, which would work today and
would be equivalent to using nullptr, assuming the current proposed resolution
of 834 or something similar. I would be very surprised if 834 is resolved in a
way that allows different semantics for get() == nullptr and get() == pointer()
i.e.
explicit operator bool() const
{ return get() == pointer() ? false : true; }
// Modifiers.
pointer
release()
{
pointer __p = get();
std::get<0>(_M_t) = pointer();
return __p;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43183