I want to use the Boost library to split a string, but I am getting a compilation error with Visual Studio.
My code has #include "boost/algorithm/string/split.hpp";
and #include "boost/algorithm/string/classification.hpp";
and my project's include directories contains C:\Data\Libraries\Boost_1.56.0
, which itself contains the root boost
directory with Boost's header files.
I then have the following:
std::string line = "this,is,a,test";
std::vector<std::string> strings;
boost::algorithm::split(strings, line, boost::is_any_of(','));
But this gives me all sorts of errors, such as:
Error 37 error C2039: 'type' : is not a member of 'boost::mpl::eval_if_c<false,boost::range_const_iterator<char,void>,boost::range_mutable_iterator<char,void>>' C:\Data\Libraries\Boost_1.56.0\boost\range\iterator.hpp 69
Any help?