
"David B. Held" <dheld@codelogicconsulting.com> wrote in message news:ciidcc$4tl$1@sea.gmane.org...
Jonathan Turkanis wrote:
[...] 2. I don't understand the following statement:
Unlike std::basic_string<>, empty string object references empty c-style string "".
I think this means that if the string contains a charT*, it will never be null (but rather point to a special empty string object).
This is what I would have expected. The phrase 'unlike std::basic_string<>' confused me.
I don't see why the user would need to know that, unless it implies something special about begin() and end().
3. What are the semantics of
std::string str("abc"); h(boost::cref(str));
Without looking at the code, I would expect that the const_string<> would share a representation with str, thus implying that it had better not outlive str.
And that str must not be modified during its lifetime, I guess. Jonathan