Boost logo

Boost Users :

Subject: Re: [Boost-users] [type_traits] an is_iterator, not is_pointer, trait
From: Belcourt, K. Noel (kbelco_at_[hidden])
Date: 2011-11-03 18:21:36


On Nov 3, 2011, at 4:06 PM, Frédéric Bron wrote:

>> 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

Thanks Frédéric, that's the path I was heading down. I appreciate the
help!

-- Noel


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