boost multiindex: trying to create a template

I am trying to do the following in order to create a templatized data structure which is both hashed and sequenced..
template <class T> // class T will always have a member clientid
class seq_hash_list {
typedef multi_index_container
<
T *,
indexed_by
<
sequenced< >,
hashed_unique
client_info_map;
// typedef client_info_map::nth_index<1>::type clinfo_map_hash; // typedef client_info_map::nth_index<0>::type clinfo_map_list; public: client_info_map _clmap; }; This compiles fine. But when i uncomment the two index typedefs (above), the compilation fails saying "ISO C++ forbids declaration of `nth_index' with no type". Is there any other way of achieving the same result? Thanks, Sharad

AMDG Sharad Mittal wrote:
I am trying to do the following in order to create a templatized data structure which is both hashed and sequenced..
// typedef client_info_map::nth_index<1>::type clinfo_map_hash;
// typedef client_info_map::nth_index<0>::type clinfo_map_list;
* *
This compiles fine. But when i uncomment the two index typedefs (above), the compilation fails saying "ISO C++ forbids declaration of `nth_index' with no type".
Is there any other way of achieving the same result?
typedef *typename* client_info_map::*template* nth_index<1>::type clinfo_map_hash; In Christ, Steven Watanabe
participants (2)
-
Sharad Mittal
-
Steven Watanabe