"Thorsten Ottosen" <[EMAIL PROTECTED]> writes: > "Alisdair Meredith" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Thorsten Ottosen wrote: >> >> > 2. many standard algorithms take a single output iterator as an > argument. >> > Currently the argument for output must be a container. Should >> > it be posible to specify an iterator here too? >> >> Absolutely! Not all iterators belong to containers eg ostream_iterator > > I see your point. Does anyone have a nice idea of how to detect when the > template argument is an iterator?
Sadly, there is no reliable way. The closest thing I can imagine is to use SFINAE to check that iterator_traits<T> has valid types, and that the types are consistent with the iterator requirements. -- Dave Abrahams Boost Consulting www.boost-consulting.com _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost