|
Boost Users : |
From: JOAQUIN LOPEZ MU?Z (joaquin_at_[hidden])
Date: 2007-09-20 18:07:04
Hello Mark,
----- Mensaje original -----
De: Mark Schlegel <moschleg_at_[hidden]>
Fecha: Jueves, Septiembre 20, 2007 11:24 pm
Asunto: [Boost-users] [multi-index]/shared_ptr template issue -
compiles on
MSVC8 but not gcc
Para: boost-users_at_[hidden]
[...]
> // this AGE_INDEX does not on gcc but DOES compile on MSVC8
> typedef AgedMap<T>::AGEDMAPTYPE::index<agetag>::type AGE_INDEX;
The correct syntax is
typedef typename AgedMap<T>::AGEDMAPTYPE::template
index<agetag>::type AGE_INDEX;
(note the intervening template keyword) which, just for
succintness, in your particular ought to be the same, I think, as
typedef typename MIContainer::template index<agetag>::type AGE_INDEX;
The dependent template keyword can cause problems in non-conformant
compilers. If you meet those, try the variants:
typedef typename boost::multi_index::index<
typename AgedMap<T>::AGEDMAPTYPE,agetag>::type AGE_INDEX;
or
typedef typename boost::multi_index::index<
MIContainer,agetag>::type AGE_INDEX;
Good luck,
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