This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/43183] std::unique_ptr::reset() does not conform to N3035.



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]