Fantastic!! Many thanks. I have scanned through the boost documentation for this library several times to find some clues. Did I miss anything there? I would like to know where I can find the section where this is documented for future reference. Again thanks alot. You've been of great help. Paul -----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org]On Behalf Of Joaquín Mª López Muñoz Sent: woensdag 19 september 2007 12:28 To: boost-users@lists.boost.org Subject: Re: [Boost-users] Using multi-index as container type intemplated class Hi Paul, Paul.VanHagen@shell.com ha escrito:
Hello,
I am having trouble using a boost::multi_index_container type in a template class where the multi-index value type is depending on the template arg type of the class.
In particular, I'm getting compiler errors when trying to define the iterator and index types using the "type" typedefs in the multi_index container. Apparently, at compile time the index and iterator types cannot be deduced resulting in errors like "cannot convert to typename, etc.".
I'm using GCC 3.3.1 and Boost 1.34.1.
Well, seems like the compiler is having a hard time with dependent nested types.
Probably newer versions of GCC will pose less problems. Fortunately, you can
use global variants for nth_index etc., which happen to be easier for the compiler.
So, instead of
typedef typename mi::nth_index<0>::type mi_by_value;
you can write
typedef typename nth_index