|
Boost : |
Subject: [boost] multi_index problems
From: Brook Milligan (brook_at_[hidden])
Date: 2012-01-26 15:26:34
I am trying to use boost.MultiIndex as a class data member and am
having difficulty because it seems that calling get<>() will not
compile on a NetBSD box (gcc version 4.1.3). The code below
illustrates a simple test case.
Am I missing something obvious or doing something clearly mistaken?
Any help is greatly appreciated.
Thanks alot.
Cheers,
Brook
===========================================================================
#include <boost/multi_index_container.hpp>
#include <boost/multi_index/sequenced_index.hpp>
namespace mi = boost::multi_index;
template < typename T >
struct container
{
typedef mi::multi_index_container< T, mi::indexed_by< mi::sequenced< > > >
type;
};
template < typename T >
struct S
{
typedef typename container< T >::type container_type;
void operator () () const
{
c_.get<0>(); // XXX - will not compile
}
private:
container_type c_;
};
int main () { return 0; }
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk