Subject: Re: [boost] Heads up - string_ref landing
From: Yakov Galka (ybungalobill_at_[hidden])
Date: 2012-12-12 02:38:12
On Tue, Dec 11, 2012 at 11:47 PM, Rob Stewart <robertstewart_at_[hidden]>wrote:
> On Dec 10, 2012, at 7:55 AM, Sergey Cheban <s.cheban_at_[hidden]> wrote:
> > On 09.12.2012 17:13, Rob Stewart wrote:
> >>>> - safe bool or explicit bool conversion operator
> >>> I don't think this is a good idea.
> >> Why not?
> > This seems to be not intuitive and not so safe.
> It is quite intuitive to me. true means non-null, and false means null.
Would it mean !empty() or !!begin()?
> The std::string has no such operator.
> Why does that matter? It's still convenient. It would be a nice addition
> to std::string.
std::string does not have a 'null' state.