This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Core dump constructing a C++ string with NULL
- From: Tom Browder <tom dot browder at gmail dot com>
- To: GCC-help <gcc-help at gcc dot gnu dot org>
- Date: Thu, 13 Jan 2011 13:56:26 -0600
- Subject: Core dump constructing a C++ string with NULL
It would be nice if this would construct an empty string:
#include <string>
std::string s(0);
At the moment that gives a core dump.
Is that defined behavior according to the standard? If not, what
about a g++ enhancement?
Thanks.
Regards.
-Tom
Thomas M. Browder, Jr.
Niceville, Florida
USA