David Abrahams wrote:
List< char > l = makeList(some_std_string) + makeList(some_char_array);
We call that "any_iterator" (see http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?LibrariesUnde...)
I think I focusing more on compounds like the above concatenation, but also filters and maps. I want to have the list expressiveness of Lisp, Haskell or Python to define what collections I want to have rather than using the stl algorithms to tell how collections are being contructed.
Well, a generalized single-pass iterator can't be writable unless it has a proxy reference, IIRC. Otherwise, how does *x = a; work?
According to the new iterator concepts it should be perfectly fine to have an lvalue access single-pass iterator. It is always up to the iterator's implementor what requirements he implements. Although I admit that this will be a rare combination and if my own iterators fall under these conditions, it's just because I'm lazy. Best regards, Jens