
"Alex Chovanec" <achovane@engin.umich.edu> wrote in message news:cgapen$tfi$1@sea.gmane.org...
"Thomas Witt" <witt@acm.org> wrote in message news:cgal5p$lb4$1@sea.gmane.org...
How do you implement that?
Thomas,
I'm using the SFINAE principle. I have two member functions called
'test' in
'struct detail::is_iterator_impl', where one of them is a template:
static char (& test(...))[2];
template <typename T> static char test( T *, type_tag<typename T::value_type> * = 0, type_tag<typename T::reference> * = 0, type_tag<typename T::pointer> * = 0, type_tag<typename T::difference_type> * = 0, type_tag<typename T::iterator_category> * = 0,
Note that boost already has a facility for detecting member types. See boost/mpl/aux_/has_xxx.hpp. Jonathan