Boost logo

Boost Users :

From: JOAQUIN LOPEZ MU?Z (joaquin_at_[hidden])
Date: 2006-03-11 16:03:21


----- Mensaje original -----
De: bert hubert <bert.hubert_at_[hidden]>
Fecha: Sábado, Marzo 11, 2006 6:39 pm
Asunto: [Boost-users] multi_index 1.33.0,known problems with RHEL 3
        compiler (gcc 3.2.3)?

> 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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net