Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-09-18 18:05:19

"David B. Held" <dheld_at_[hidden]> wrote in message
> 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.


Boost list run by bdawes at, gregod at, cpdaniel at, john at