This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] libstdc++/8347


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]