help-gplusplus
[Top][All Lists]
Advanced

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

Re: g++ 4: error: no type named ‘iterator_category’ in ‘class myclass’


From: red floyd
Subject: Re: g++ 4: error: no type named ‘iterator_category’ in ‘class myclass’
Date: Fri, 08 Jul 2005 20:32:43 GMT
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

Johannes Zellner wrote:
Hello,

with g++ 4 (4.0.1) I get the message

{...}/stl_iterator_base_types.h:129: error: no type named 
‘iterator_category’ in ‘class myclass’

where all my code (including myclass) compiled with previous g++ versions
(e.g. g++ 3.3 / g++ 3.4).

I believe that myclass is a valid output iterator class, e.g. for
std::copy, e.g.

    class myclass
    {
    public:
        myclass();
        myclass& operator = (int);
        myclass& operator ++ ();
        myclass& operator * ();
    };

What's the problem?

Any help much appreciated!



I think you need to instantiate std::iterator_traits<> for myclass.

Look at #include <iterator>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]