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]

gcc-2.95.1 pedantic bug? some map template does not work within template function


#include <map>

typedef struct ppkg * PPKG;
int get_id(PPKG, int *);

template <class X, class Y>
void getMenu(int (*)(Y, X*))
{
#ifndef BROKEN
  // this does not seem to define a type
  typedef map <X, Y> DescMap;
#else
  typedef map <int, PPKG> DescMap;
#endif
  // -pedantic complains if the first form of typedef is used above
  typedef DescMap::const_iterator DescIterator;
}

void ppkg_component_member()
{
  getMenu(get_id);
}


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