Hi!
for some reason these two typdefs do not work in my code:
typedef typename PriorityQueue::nth_index<0>::type DissimilarityIndex;
typedef typename PriorityQueue::index<DissimilarityT>::type
DissimilarityIndex;
When I actually use them:
const DissimilarityIndex& di =_priority_queue.get<DissimilarityT>();
I get error-messages like this:
../../../pocket_graph/src/clustering/NearestNeighbors.h:300: error:
invalid
initialization of reference of type 'typename
boost::multi_index::multi_index_container::nth_index<0>::type&' from expression of type 'const
boost::multi_index::detail::ordered_index, std::less<float>,
boost::multi_index::detail::ordered_index, std::less<uint>,
boost::multi_index::detail::ordered_index, std::less<uint>,
boost::multi_index::detail::index_base,
boost::multi_index::const_mem_fun,
boost::multi_index::detail::null_arg>,
boost::multi_index::ordered_unique,
boost::multi_index::const_mem_fun,
boost::multi_index::detail::null_arg>,
boost::multi_index::ordered_non_unique,
boost::multi_index::const_mem_fun,
boost::multi_index::detail::null_arg>, mpl_::na, mpl_::na, mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na,
mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na>,
std::allocator >,
boost::multi_index::tag,
boost::multi_index::detail::ordered_non_unique_tag>,
boost::multi_index::tag, boost::multi_index::detail::ordered_unique_tag>,
boost::multi_index::tag,
boost::multi_index::detail::ordered_non_unique_tag>'
The following typedef works:
typedef typename
boost::multi_index::index::type
DissimilarityIndex;
The first two typedefs are in some way the more "natural" way to use
indices and I wonder if I have just missed to set some preprocessor
symbol...
...I am using gcc 3.2.2
Thanks, Lars