Boost logo

Boost Users :

Subject: Re: [Boost-users] [type_traits] an is_iterator, not is_pointer, trait
From: Frédéric Bron (frederic.bron_at_[hidden])
Date: 2011-11-03 18:06:35


> I'm looking to use a trait in enable_if that can distinguish between a raw
> pointer and any other valid iterator type, essentially the difference
> between iterator traits and the raw pointer specialization.

You could maybe use the following:

::boost::type_traits::ice_and<
   ::boost::type_traits::ice_not< ::boost::is_pointer< T >::value >::value,
   ::boost::has_post_increment< T >::value,
   ::boost::has_dereference< T >::value
>::value

Frédéric


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net