
On Dec 13, 2012, at 9:05 AM, Gottlob Frege <gottlobfrege@gmail.com> wrote:
On Thu, Dec 13, 2012 at 5:20 AM, Rob Stewart <robertstewart@comcast.net>wrote:
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.
Me too maybe. But either way, there is another 'generally useful interpretation'. And fairly well known.
For string_ref, it could mean the difference between these 2 string_refs, assuming a ptr+size implementation:
{ ptr != 0, size == 0 } and { ptr == 0, size == hopefully_zero }
Just added another set of tests for string_refs. All zero length string_refs are == -- Marshall Marshall Clow Idio Software <mailto:mclow.lists@gmail.com> A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait). -- Yu Suzuki