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: Simon Buchan
Subject: Re: g++ 4: error: no type named ‘iterator_category’ in ‘class myclass’
Date: Fri, 23 Sep 2005 23:02:55 +1200
User-agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)

red floyd wrote:
red floyd wrote:


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

Look at #include <iterator>


Even better, inherit from std::iterator.  See Josuttis 7.5.2.

class myclass : public <std::output_iterator_tag, [mytype], std::ptrdiff_t, [mytype*], [mytype&]>
{
 // ...
};
I assume you ment 'class myclass : public std::iterator<...'
I seem to remember some trick with deriving from iterator_traits (from The C++ Language, 3rd Ed.)





reply via email to

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