J
jose luis fernandez diaz
Hi,
When I compiling the program below:
#include <map>
using namespace std;
template<typename td1, typename td2, typename td3,typename td4>
class Tarificador
{
public:
typedef std::map<td4, int> mapD4;
typedef std::map<td3, mapD4> mapD3;
typedef std::map<td2, mapD3> mapD2;
typedef std::map<td1, mapD2> mapD1;
mapD1 listaTarifas;
};
int main()
{
Tarificador<int, int, int ,int> t1;
return 0;
}
the next messages are shown:
Error 849: Exact position unknown; near ["foo.C", line 18]. # External
symbol too long, truncated from 6599
to 4000 bytes,
__ct__Q2_4__rw14__rw_tree_iterXTQ2_3std4pairXTCiTQ2_3std3mapXTiTQ2_3std3mapXTiTQ2_3std3mapXTiTiTQ2_3std4le
ssXTi_TQ2_3std9allocat...
Error 849: Exact position unknown; near ["foo.C", line 18]. # External
symbol too long, truncated from 4982
to 4000 bytes,
erase__Q2_4__rw9__rb_treeXTiTQ2_3std4pairXTCiTQ2_3std3mapXTiTQ2_3std3mapXTiTQ2_3std3mapXTiTiTQ2_3std4lessX
Ti_TQ2_3std9allocatorX...
If I change the program:
// typedef std::map<td4, int> mapD4;
typedef std::map<td3, int> mapD3;
it compiles fine. I guess that the problem is that there is a limit in
the definition of recursive templates.
My OS and compiler are:
cronos:jdiaz:tmp>uname -a
HP-UX cronos B.11.11 U 9000/800 820960681 unlimited-user license
cronos:jdiaz:tmp>aCC -V
aCC: HP ANSI C++ B3910B A.03.37
How can I fix this problem ?
Thanks,
Jose Luis.
When I compiling the program below:
#include <map>
using namespace std;
template<typename td1, typename td2, typename td3,typename td4>
class Tarificador
{
public:
typedef std::map<td4, int> mapD4;
typedef std::map<td3, mapD4> mapD3;
typedef std::map<td2, mapD3> mapD2;
typedef std::map<td1, mapD2> mapD1;
mapD1 listaTarifas;
};
int main()
{
Tarificador<int, int, int ,int> t1;
return 0;
}
the next messages are shown:
Error 849: Exact position unknown; near ["foo.C", line 18]. # External
symbol too long, truncated from 6599
to 4000 bytes,
__ct__Q2_4__rw14__rw_tree_iterXTQ2_3std4pairXTCiTQ2_3std3mapXTiTQ2_3std3mapXTiTQ2_3std3mapXTiTiTQ2_3std4le
ssXTi_TQ2_3std9allocat...
Error 849: Exact position unknown; near ["foo.C", line 18]. # External
symbol too long, truncated from 4982
to 4000 bytes,
erase__Q2_4__rw9__rb_treeXTiTQ2_3std4pairXTCiTQ2_3std3mapXTiTQ2_3std3mapXTiTQ2_3std3mapXTiTiTQ2_3std4lessX
Ti_TQ2_3std9allocatorX...
If I change the program:
// typedef std::map<td4, int> mapD4;
typedef std::map<td3, int> mapD3;
it compiles fine. I guess that the problem is that there is a limit in
the definition of recursive templates.
My OS and compiler are:
cronos:jdiaz:tmp>uname -a
HP-UX cronos B.11.11 U 9000/800 820960681 unlimited-user license
cronos:jdiaz:tmp>aCC -V
aCC: HP ANSI C++ B3910B A.03.37
How can I fix this problem ?
Thanks,
Jose Luis.