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]
Other format: [Raw text]

[Bug c++/24811] Wrong compile template class with itetrator inside this class.See example.



------- Comment #1 from pinskia at gcc dot gnu dot org  2005-11-11 20:24 -------
std::multimap<Key,int>::iterator iter;


You forgot the typename keyword as std::multimap<Key,int> is dependent.

So your source should look like:
  template <typename Key,typename Value>
class mutant_iter
{
private:
  std::vector<Value> *Vector;
  std::multimap<Key,int> *Mmap;
  typename std::multimap<Key,int>::iterator iter;
};


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24811


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