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

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

 



On Fri, Jan 14, 2011 at 10:47, Jonathan Wakely <jwakely.gcc@xxxxxxxxx> wrote:
> 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.

Two questions:

1.  does it take any significant time difference to check for a 0
versus throw an exception (one argument against)?

2.  Isn't a '\0' an empty string in the string context?

Respectfully,

-Tom


[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