Boost logo

Boost Users :

Subject: [Boost-users] [type_traits] an is_iterator, not is_pointer, trait
From: Belcourt, K. Noel (kbelco_at_[hidden])
Date: 2011-11-03 17:27:34


Hi,

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.

template <class Iterator>
struct iterator_traits;

template <class T>
struct iterator_traits<T*>;

I was hoping to find a boost::is_iterator type trait which would
return false_type for is_iterator<int*> (any raw pointer) and true
type for any other valid iterator. This would allow me to group
iterators via is_pointer and is_iterator. I was just wondering if
this already exists somewhere?

Thanks.

-- Noel Belcourt


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