[xml] C++-related libxml2 bug



Hello,

I found that include/libxml2/libxml/SAX.h contains:

void reference (void *ctx,
                                                 const xmlChar *name);

On the other hand, include/g++-v3/bits/stl_iterator_base_types.h contains:

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;
};

When I derive a class from "iterator" and use "reference" typename
(standard C++ technique), the compilation blows up. I don't think that
using global names such as "reference", "characters", "comment" (all
defined in SAX.h) in a library is a good idea.


Thanks,

Andres.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]