Boost logo

Boost :

Subject: [boost] [multi_index]: Migration of code to VS12 does not compile anymore
From: Johannes Brunen (jbrunen_at_[hidden])
Date: 2014-08-11 11:05:34


Hello,

 

I'm porting some code fromVS10 to the VS12 compiler on windows. I have a
problem compiling code like the following:

 

//Test.cpp

#include <boost/multi_index_container.hpp>

#include <boost/multi_index/random_access_index.hpp>

#include <boost/multi_index/hashed_index.hpp>

#include <boost/multi_index/identity.hpp>

 

template<typename T>

class test

{

public:

    typedef typename boost::multi_index_container <

        T*,

        boost::multi_index::indexed_by <

            boost::multi_index::random_access<>,

            boost::multi_index::hashed_non_unique <
boost::multi_index::identity<T*> >

>

> container_t;

 

    typedef typename container_t::nth_index<0>::type sequence_index_t;

};

 

This does not compile and gives the following error message:

 

1> Test.cpp

1>D:\test\Test.cpp(18): error C2059: syntax error : '<'

1> D:\test\Test.cpp(19) : see reference to class template
instantiation 'test<T>' being compiled

1>D:\test\Test.cpp(18): error C2238: unexpected token(s) preceding ';'

 

I'm unable to find the reason for this error. Is it a compiler error, or
is something wrong with my declaration?

 

Regards,

Johannes

 


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