This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: STL iterator class


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]