Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-05-10 16:27:45


Pavol Droba wrote:

> Yet I understand you reservations, but the only way out of this
> problem would be to
> define different boost::end() for string ranges. I'm not sure if this
> is an acceptable way.

This is pretty much what I was saying. Looking for a NULL terminator is only
acceptable when you know that you are dealing with NULL-terminated strings.

If I'm writing generic code that works on C arrays, I'll use N as the size
of T[N]. If I'm writing generic code that works on strings, I'll use N-1 or
strlen. I won't use the Range library in either of these cases because it
tries to guess which one I need.


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