[RFC] libstdc++/8347

Paolo Carlini pcarlini@unitus.it
Fri Oct 25 09:11:00 GMT 2002


B. Kosnik wrote:

>That's a good question....... right now I'd lean towards removing the
>_S_construct bits. Thoughts?
>
Hi Benjamin,

thanks for your feedback.
I think that most probably we can keep the best of both worlds: still 
raise an exception if a zero pointer is passed to a constructor as in:

    const char* bogus = 0;
    std::string str1(bogus);

but allow for a *couple* of zero pointers identifying a null range as in:

     std::vector<char> empty;
     std::string empty2(empty.begin(),empty.end());

consistently with:

     std::string empty;
     std::string empty2(empty.begin(),empty.end());

and the behaviour of *all* the other implementations I have access to.

Patch in progress!!!

Ciao,
Paolo.



More information about the Libstdc++ mailing list