Boost logo

Boost Users :

From: Markus Werle (numerical.simulation_at_[hidden])
Date: 2008-04-09 06:15:52


Hi!

The following piece of code used to compile with previous versions of boost:

using namespace boost::xpressive;
sregex path_delimiter = '/';

Now it bails out on VC8 SP1 with (beautified output):

------ Build started: Project: XXXX, Configuration: Release Win32
------ Compiling... MainFrm.cpp
MY_PATH_TO_BOOST\boost_1_35_0\boost/xpressive/proto/matches.hpp(356) :
error C2825: 'Expr': must be a class or namespace when followed by '::'

MY_PATH_TO_BOOST\boost_1_35_0\boost/xpressive/detail/static/grammar.hpp(317)
: see reference to class template instantiation
'boost::proto::result_of::matches<Expr,Grammar>' being compiled with
 [ Expr=char, Grammar=boost::xpressive::Grammar<char> ]
MY_PATH_TO_BOOST\boost_1_35_0\boost/mpl/if.hpp(63) : see reference to
class template instantiation
'boost::xpressive::is_valid_regex<Expr,Char>' being compiled with
[ Expr=char, Char=char ]
MY_PATH_TO_BOOST\boost_1_35_0\boost/xpressive/basic_regex.hpp(94) : see
reference to class template instantiation 'boost::mpl::if_<T1,T2,T3>'
being compiled with [
T1=boost::xpressive::is_valid_regex<char,char>, T2=boost::mpl::true_,
 T3=boost::xpressive::INVALID_REGULAR_EXPRESSION ]
.\MainFrm.cpp(1514) : see reference to function template instantiation
'boost::xpressive::basic_regex<BidiIter>::basic_regex<char>(const Expr
&)' being compiled with [
BidiIter=std::_String_const_iterator<char,std::char_traits<char>,
std::allocator<char>>,
 Expr=char ]
MY_PATH_TO_BOOST\boost_1_35_0\boost/xpressive/proto/matches.hpp(356) :
error C2143: syntax error : missing ',' before '`global
namespace'::proto_base_expr'
MY_PATH_TO_BOOST\boost_1_35_0\boost/xpressive/proto/matches.hpp(356) :
error C2977: 'boost::proto::detail::matches_impl' : too many template
arguments
MY_PATH_TO_BOOST\boost_1_35_0\boost/xpressive/proto/matches.hpp(260) :
see declaration of 'boost::proto::detail::matches_impl'
MY_PATH_TO_BOOST\boost_1_35_0\boost/xpressive/proto/matches.hpp(357) :
error C2955: 'boost::proto::detail::matches_impl' : use of class
template requires template argument list
MY_PATH_TO_BOOST\boost_1_35_0\boost/xpressive/proto/matches.hpp(260) :
see declaration of 'boost::proto::detail::matches_impl'
MY_PATH_TO_BOOST\boost_1_35_0\boost/xpressive/basic_regex.hpp(94) :
error C2664: 'boost::mpl::assertion_failed' : cannot convert parameter 1
from 'boost::mpl::failed
************boost::xpressive::INVALID_REGULAR_EXPRESSION::* ***********'
to 'boost::mpl::assert<false>::type' No constructor could take the
source type, or constructor overload resolution was ambiguous
MY_PATH_TO_BOOST\boost_1_35_0\boost/xpressive/basic_regex.hpp(95) :
error C2514: 'boost::xpressive::is_valid_regex<Expr,Char>' : class has
no constructors with [ Expr=char, Char=char ] Build

What went wrong?

Changing the code to
  sregex path_delimiter = sregex::compile("/");

fixes the issue for me, but I missed this change in the release notes ...

Markus


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net