This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/81885] operator-> not checked by -D_GLIBCXX_ASSERTIONS
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 18 Aug 2017 13:01:08 +0000
- Subject: [Bug libstdc++/81885] operator-> not checked by -D_GLIBCXX_ASSERTIONS
- Auto-submitted: auto-generated
- References: <bug-81885-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81885
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> ---
No, because there's nothing wrong with calling operator-> on a null unique_ptr:
std::unique_ptr<int> p;
int* pp = p.operator->();
I'd be more inclined to remove the pedantic assertion in debug mode.