STL iterator class
Ross Smith
ross.s@ihug.co.nz
Sun Nov 7 18:02:00 GMT 1999
Bjoern Ruff wrote:
>
> [ GCC's STL doesn't have class iterator ]
>
> Are there any known solutions, workarounds or work in progress to change the
> behaviour?
In stl_iterator.h you'll find:
#ifdef __STL_USE_NAMESPACES
template <class _Category, class _Tp, class _Distance = ptrdiff_t,
class _Pointer = _Tp*, class _Reference = _Tp&>
struct iterator {
typedef _Category iterator_category;
typedef _Tp value_type;
typedef _Distance difference_type;
typedef _Pointer pointer;
typedef _Reference reference;
};
#endif
If you comment out the #ifdef/#endif, it works fine. I have no idea why
it's defined out when namespaces are disabled anyway (does anyone?).
--
Ross Smith <ross.s@ihug.co.nz> The Internet Group, Auckland, New Zealand
========================================================================
"There are many technical details that make Linux attractive to the
sort of people to whom technical details are attractive." -- Suck
More information about the Gcc-bugs
mailing list