Boost logo

Boost :

Subject: Re: [boost] Heads up - string_ref landing
From: Rob Stewart (robertstewart_at_[hidden])
Date: 2012-12-13 05:20:00


On Dec 12, 2012, at 12:30 PM, Gottlob Frege <gottlobfrege_at_[hidden]> wrote:

> On Wed, Dec 12, 2012 at 10:49 AM, Rob Stewart <robertstewart_at_[hidden]>wrote:
>
>>>>>
>>>>> std::string does not have a 'null' state.
>>>>
>>>> It's the state represented by empty().
>>>
>>> I am not sure it is so certainly accepted by all.
>>
>> It is the logical interpretation. It indicates whether the string is
>> non-empty. I don't see any other generally useful interpretation, do you?
>
> Qt's QString has both empty() and isNull() and they are not always the same. Basically empty() is a zero-byte string, but null is a
> never-been-set-or-allocated string.
[snip]

> Somewhat like optional<string>.

That's how I'd spell it.

___
Rob


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk