Re: Core dump constructing a C++ string with NULL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 14 January 2011 16:19, Tom Browder wrote:
>
> How about a compiler option then, something like
> "--allow-c++-null-string-constructor"...

We throw an exception, std::logic_error, indicating a precondition violation.

Silently ignoring a problem and acting as though a different
constructor was called encourages non-portable code.
It's also an additional maintenance burden, for questionable benefit.
I certainly don't want to have to test my changes to std::string twice
with different builds.

If you don't care about portability you're free to modify the code
yourself for your own use.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux