This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Errors from Gcc
> What are these trying to tell me to do? These errors sprung up while in
> the headers of the package I am trying to build.
>
> These confuse me. It complains that it is redefining something, but lists
> the same place for each.
No. First, it lists line 121, which starts the definition
template <class _Tp>
struct iterator_traits<const _Tp*> {
typedef random_access_iterator_tag iterator_category;
typedef _Tp value_type;
typedef ptrdiff_t difference_type;
typedef const _Tp* pointer;
typedef const _Tp& reference;
};
Then, it lists (as previous definition) line 118, which ends the
definition
template <class _Tp>
struct iterator_traits<_Tp*> {
typedef random_access_iterator_tag iterator_category;
typedef _Tp value_type;
typedef ptrdiff_t difference_type;
typedef _Tp* pointer;
typedef _Tp& reference;
};
Now, these are not the same thing, as one of them is a const
specialization. Could it be that there is a #define for const? Please
look at the preprocessor output to make sure they still look as they
did in the header.
Regards,
Martin