D
ds
Hi all,
what I try to do is the following:
template<class Tp> class themap
{
public:
typedef int Tp::*ptr;
static std::map<std::string, Tp:tr> smap;
};
template<class Tp>
std::map<std::string, Tp:tr> themap<Tp>::smap;
though the typedef compiles, the specialization of the map fails. The
idea is to make it possible to define a pointer to an integer member
of a class and use it in the mappings. Unfortunately I cannot find any
reasonable workaround apart from declaring the typedef and the map in
every class separately. Any ideas?
thanks a lot!
-- dimitris
what I try to do is the following:
template<class Tp> class themap
{
public:
typedef int Tp::*ptr;
static std::map<std::string, Tp:tr> smap;
};
template<class Tp>
std::map<std::string, Tp:tr> themap<Tp>::smap;
though the typedef compiles, the specialization of the map fails. The
idea is to make it possible to define a pointer to an integer member
of a class and use it in the mappings. Unfortunately I cannot find any
reasonable workaround apart from declaring the typedef and the map in
every class separately. Any ideas?
thanks a lot!
-- dimitris