|
template <class Iterator>
struct iterator_traits {
typedef typename Iterator::pointer pointer;
typedef typename Iterator::reference reference;
pointer a;
Iterator b;
Iterator* c;
};
#if 1
// template partial specialization, need to implement in CINT
template <class T>
struct iterator_traits<T*> {
typedef T* pointer;
typedef T& reference;
pointer a;
T b;
T* c;
};
#endif
#if 1
template <class T>
struct iterator_traits<const T*> {
typedef const T* pointer;
typedef const T& reference;
pointer a;
const T b;
const T* c;
};
#endif
class iter {
public:
typedef void* pointer ;
typedef void* reference ;
};
iterator_traits<iter> a1;
iterator_traits<int*> b2;
iterator_traits<const int*> c3;
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.