Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11150: string_ref::to_string is necessarily UB for a default-constructed string_ref, despite stating no preconditions
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-03-28 23:16:37
#11150: string_ref::to_string is necessarily UB for a default-constructed
string_ref, despite stating no preconditions
--------------------------------+---------------------------
Reporter: Tomalak Geret'kal | Owner: no-maintainer
Type: Bugs | Status: closed
Milestone: To Be Determined | Component: utility
Version: Boost 1.57.0 | Severity: Problem
Resolution: fixed | Keywords:
--------------------------------+---------------------------
Comment (by Tomalak Geret'kal):
I disagree. There is such a thing as an array of [at least] 0 elements of
`charT`:
{{{
char* ptr = new char[0];
delete[] ptr;
}}}
and a NULL pointer cannot ever point to such an array. It doesn't point to
anything.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11150#comment:3> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC