[Bug c++/60168] Incorrect check in ~unique_ptr() when Deleter::pointer type is not a pointer type

2014-02-12 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60168

Jonathan Wakely redi at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #1 from Jonathan Wakely redi at gcc dot gnu.org ---
Not a bug, the type unique_ptrT,D::pointer must meet the requirements of a
NullablePointer which includes being comparable with nullptr, so int is not
allowed


[Bug c++/60168] Incorrect check in ~unique_ptr() when Deleter::pointer type is not a pointer type

2014-02-12 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60168

--- Comment #2 from Jonathan Wakely redi at gcc dot gnu.org ---
The standard also specifies the behaviour of ~unique_ptrT,D in terms of
comparing the stored pointer with nullptr.


[Bug c++/60168] Incorrect check in ~unique_ptr() when Deleter::pointer type is not a pointer type

2014-02-12 Thread ashish.sadanandan at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60168

--- Comment #3 from Ashish Sadanandan ashish.sadanandan at gmail dot com ---
You are right, of course. Not a bug, but it's disappointing that it isn't. If
that comparison were against a value initialized unique_ptrT, D::pointer,
instead of nullptr, it'd allow unique_ptr to be used to manage any generic
`handle` type, which may not meet the requirements of NullablePointer.