Boost logo

Boost :

From: Brock Peabody (brock.peabody_at_[hidden])
Date: 2005-11-07 13:07:58


If I try to compile the very first example in multi index I get the
following error:

c:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\include\boost\multi_index\detail\node_type.hpp(56) : error
C2903: 'node_class' : symbol is neither a class template nor a function
template

I get this with 1.33 and 1.32. I've tried many different compiler
options. Here is my latest command line:

/Ox /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "NOMINMAX" /D "_AFXDLL" /D
"_MBCS" /FD /EHsc /MD /GS /Fo"Release/" /Fd"Release/vc70.pdb" /W3
/nologo /c /Wp64 /Zi /TP

I've dug around a bit and I can't make any sense of this problem. Has
anyone else seen this?

The exact code I'm compiling is:

#include <boost/multi_index/key_extractors.hpp>
#include <boost/multi_index_container.hpp>

#include <string>

struct employee
{
    int id;
    std::string name;

    employee(int id,const std::string& name):id(id),name(name){}

    bool operator<(const employee& e)const{return id<e.id;}
};

using namespace boost::multi_index;

// define a multiply indexed set with indices by id and name
typedef multi_index_container<
employee,
indexed_by<
        // sort by employee::operator<
        ordered_unique<identity<employee> >,
        
        // sort by less<string> on name
        ordered_non_unique<member<employee,std::string,&employee::name>
>
>
> employee_set;

employee_set e;

Thanks!


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk