Re: [boost] Re: char[] support in Boost.Range

IMO the char[] as string default looks cool in the examples from boost for each and the string algorithms, but I cannot think of many practical examples of where I would have used it in my code. If I'm handing strings that I want to do something interesting with, I'll probably have read them into std::string as I usually cannot predict their lengths. Of course my experience may be atypical. Maintaining the uniformity of treatment of arrays would seem to me to be of more benefit in generic code. --- Eric Niebler <eric@boost-consulting.com> wrote:
On Sun, May 15, 2005 at 08:17:15PM -0400, David Abrahams wrote:
"Thorsten Ottosen" <nesotto@cs.auc.dk> writes:
| I'd like to leave it for the discussion. Right now it seems, that | most of the people that entered discussion
| I would prefer c-string view, but I'm probably biased by the fact | that I'm the author of StringAlgo library.
I prefer the string view too.
I just have one thing to say: vector<bool>.
Pardon me, but somehow I cannot figure out the
Pavol Droba wrote: prefer c-array view. point here. Can you please
explain the me the connection to vector<bool>
vector<bool> creates all kinds of problems because generic code can't make assumptions about the behavior of vector<T>. vector<bool> is widely regarded as a Bad Move. Dave is saying that treating char[] different than, say, int[] is inviting the same sorts of problems. It will make it difficult to deal with T[] in generic code.
I agree with Dave.
-- Eric Niebler Boost Consulting www.boost-consulting.com _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Send instant messages to your online friends http://uk.messenger.yahoo.com
participants (1)
-
dan marsden