Re: [utility] question on prior(x,n)

From: David Abrahams [mailto:dave@boost-consulting.com] [snip]
Sorry, during shortening my previous mail before posting, one sentence got lost :) I was suggesting to add is_iterator,
If you can figure out how to do that, you will be a hero to many. [snip]
One way would be to check if the required iterator_traits are defined for the type, i.e. iterator_traits<T>::difference_type etc, using BOOST_MPL_HAS_XXX_TRAIT_DEF. Too fragile? Bjorn

Bjorn.Karlsson@readsoft.com wrote:
From: David Abrahams [mailto:dave@boost-consulting.com] [snip]
Sorry, during shortening my previous mail before posting, one sentence got lost :) I was suggesting to add is_iterator,
If you can figure out how to do that, you will be a hero to many. [snip]
One way would be to check if the required iterator_traits are defined for the type, i.e. iterator_traits<T>::difference_type etc, using BOOST_MPL_HAS_XXX_TRAIT_DEF. Too fragile?
No, it just doesn't work.
participants (2)
-
Bjorn.Karlsson@readsoft.com
-
Peter Dimov