(C++) iterator.hpp: Invalid template argument list

February 24, 2017 · View on GitHub

 

 

 

 

 

(C++) iterator.hpp: Invalid template argument list

 

Compile error.

 

Full error message

 


[C++ Error] iterator.hpp(62): E2401 Invalid template argument list

 

 

 

 

 

Cause

 

 


#include <boost/foreach.hpp>

 

 

 

 

 

Which takes you to the following line in 'include/boost/range/iterator.hpp':

 


typedef BOOST_RANGE_DEDUCED_TYPENAME mpl::eval_if_c< is_const<C>::value, range_const_iterator< typename remove_const<C>::type >, range_mutable_iterator<C> >::type type;

 

 

 

 

 

Solution

 

This compiler is not supported by Boost. Change to another compiler.

 

 

 

 

 

Note

 

This does not work:

 


#define BOOST_MSVC 1310 #include <boost/foreach.hpp>