This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: STL iterator class
- To: Bjoern Ruff <br at forstware dot de>
- Subject: Re: STL iterator class
- From: Ross Smith <ross dot s at ihug dot co dot nz>
- Date: Mon, 08 Nov 1999 14:01:41 +1200
- CC: gcc-bugs at gcc dot gnu dot org
- Organization: The Internet Group
- References: <NCBBIMOGDJGDJPIONLPIKENBCCAA.br@forstware.de>
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