This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
gcc-2.95.1 pedantic bug? some map template does not work within template function
- To: <bug-gcc at gnu dot org>
- Subject: gcc-2.95.1 pedantic bug? some map template does not work within template function
- From: AJRobb at bigfoot dot com
- Date: Tue, 31 Aug 1999 14:32:17 +0100
#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);
}