> The following code crashed my CodeWarrior 9.2 IDE. (Crash report in the end)
> I surprised because this code compiler under MachO without crash. I compile
[quoted text clipped - 16 lines]
>
> I need this code and I need a workaround, can anyone help me?
Thanks for pointing out the bug. The identifier name on the type is
probably getting incredibly long (try writing the type without defaulted
template parameters and typedefs).
A workaround might look like:
template <class Key, class T>
struct my_map
: public std::map<Key, T> {};
typedef my_map<std::string,std::string> TMap1;
typedef my_map<std::string,TMap1> TMap2;
typedef my_map<int,TMap2> TMap3;
typedef my_map<int,TMap3> TMap4;
typedef my_map<int,TMap4> TMap5;
TMap5 map;
You'll have to supply whatever my_map constructors you need. But the
above formulation takes the defaulted comparisons and allocators out of
the type name, greatly shortening the real name of TMap5.
-Howard
GrEnE - 25 Jun 2004 10:49 GMT
>> The following code crashed my CodeWarrior 9.2 IDE. (Crash report in the end)
>> I surprised because this code compiler under MachO without crash. I compile
[quoted text clipped - 38 lines]
> above formulation takes the defaulted comparisons and allocators out of
> the type name, greatly shortening the real name of TMap5.
Thank you very much for the workaround - this works fine.
Rene
> -Howard