
----- Mensaje original -----
De: bert hubert
Hi,
Let me start off by saying that I consider multi_index to be the most stunningly clever AND useful piece of c++ around. Thanks!
A PowerDNS user on RHEL 3 with a gcc that calls itself 'gcc 3.2.3' reportsthe following error compiling PowerDNS snapshot 576 (http://svn.powerdns.com/snapshots/576/pdns- 2.9.20.20060311.576.tar.gz):Message: http://mailman.powerdns.com/pipermail/pdns-users/2006- March/003134.html [...] 285 typedef typename waiters_t::template index<KeyTag>::type waiters_by_ttd_index_t;286 waiters_by_ttd_index_t& ttdindex=d_waiters.get<KeyTag>(); Any ideas, especially on a workaround? It compiles fine on all gcc's I have access to.
Hello Bert, I can try to investigate deeper into this next week, in the meantime let me suggest a couple of things: 1. Shouldn't be the expression waiters_by_ttd_index_t& ttdindex=d_waiters.get<KeyTag>(); written as waiters_by_ttd_index_t& ttdindex=d_waiters.template get<KeyTag>(); as d_waiters type is dependent on MTasker template args? Anyway, the error doesn't seem to be related to this, but who knows. 2. You might try the equivalent expression: waiters_by_ttd_index_t& ttdindex= boost::multi_index::get<KeyTag>(d_waiters); 3. Substituting identifiers (via an enum if you want to retain some legibility) for tags seem to reduce the stress on weaker compilers. If nothing of this works please let me know and I'll dig deeper once I've got access to a GCC environment next week. HTH, Joaquín M López Muñoz Telefónica, Investigación y Desarrollo