Boost logo

Boost Users :

Subject: Re: [Boost-users] trouble with correct type definition of multi_index::nth_index
From: joaquin_at_[hidden]
Date: 2009-03-23 03:18:24


Sandeep Gupta escribió:
> Hi,
> In the following code I am trying to get an handle to the index of a
> multi_index container. The compiler says
> "invalid initialization of reference of type
> ‘boost::multi_index::detail:..". Not sure why this is so. Since I
> wasn't sure about the source of error I have pasted the full code (
> sans declarations) is give below.
> [...]
>
> tuplestore_index_t& indexx = m_tuplestore.get<n>();
>

Haven't looked in detail, but I think there's a missing 'template'
keyword here:

 tuplestore_index_t& indexx = m_tuplestore.template get<n>();

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