I fiddled around with Dinkumware a little, but couldn't find a way to do this. Any variations, like this,
Code:
#include <iostream>
#include <string>
template <typename t>
class base_record {};
class record;
typedef std::pair<std::string, int> record::pair_type;
class record : public base_record<typename record::pair_type> {
public:
//typedef std::pair<std::string, int> pair_type;
record() { }
};
int main() {
return 0;
}
cause this sort of error:
Code:
sourceFile.cpp(8) : error C2027: use of undefined type 'record'
sourceFile.cpp(7) : see declaration of 'record'
I would suspect that you can't do this; however, I'm not sure. Maybe someone more knowledgeable about C++ will be able to tell you.