I'm trying to get started with boost xpressive, but have problems with
this simple attempt...
#pragma warning(disable:4180) // MSVC: qualifier applied to function
type has no meaning; ignored
#pragma warning(disable:4224) // MSVC: nonstandard extension used :
formal parameter 'value' was previously defined as a type
#pragma warning(disable:4996) // MSVC: 'std::transform' was declared
deprecated
#include
void f()
{
using namespace boost::xpressive;
sregex rex = as_xpr('k');
}
...which gives these errors...
------ Build started: Project: miscTest, Configuration: Debug Win32 ------
Compiling...
main.cpp
c:\boost_1_45_0\boost\xpressive\detail\static\transforms\as_matcher.hpp(27)
: error C2146: syntax error : missing ';' before identifier 'data_type'
c:\boost_1_45_0\boost\xpressive\detail\static\transforms\as_sequence.hpp(31)
: see reference to class template instantiation
'boost::xpressive::grammar_detail::as_matcher::impl'
being compiled
with
[
Expr=const
boost::proto::exprns_::expr
&,
State=boost::xpressive::detail::end_xpression,
Data=boost::xpressive::detail::xpression_visitor,boost::mpl::false_,traits_type>
]
c:\boost_1_45_0\boost\proto\matches.hpp(828) : see reference to
class template instantiation
'boost::xpressive::grammar_detail::in_sequence<Grammar>::impl'
being compiled
with
[
Grammar=boost::xpressive::grammar_detail::as_matcher,
Expr=const
boost::proto::exprns_::expr
&,
State=boost::xpressive::detail::end_xpression,
Data=boost::xpressive::detail::xpression_visitor,boost::mpl::false_,traits_type>
]
c:\boost_1_45_0\boost\xpressive\detail\static\compile.hpp(45) :
see reference to class template instantiation
'boost::proto::switch_<Cases>::impl' being compiled
with
[
Cases=boost::xpressive::grammar_detail::Cases,
Expr=const
boost::proto::exprns_::expr
&,
State=boost::xpressive::detail::end_xpression,
Data=visitor_type &
]
c:\boost_1_45_0\boost\xpressive\detail\static\compile.hpp(79) :
see reference to function template instantiation 'void
boost::xpressive::detail::static_compile_impl2(const
Xpr &,const boost::shared_ptr<T> &,const Traits &)' being compiled
with
[
Xpr=boost::proto::exprns_::expr,
BidiIter=std::_String_const_iterator,
T=boost::xpressive::detail::regex_impl>,
Traits=traits_type
]
c:\boost_1_45_0\boost\xpressive\detail\static\compile.hpp(99) :
see reference to function template instantiation 'void
boost::xpressive::detail::static_compile_impl1(const Xpr
&,const boost::shared_ptr<T> &)' being compiled
with
[
Xpr=boost::proto::exprns_::expr,
BidiIter=std::_String_const_iterator,
T=boost::xpressive::detail::regex_impl>
]
c:\boost_1_45_0\boost\xpressive\basic_regex.hpp(252) : see
reference to function template instantiation 'void
boost::xpressive::detail::static_compile(const Xpr
&,const boost::shared_ptr<T> &)' being compiled
with
[
Expr=boost::proto::exprns_::expr,
BidiIter=std::_String_const_iterator,
Xpr=boost::proto::exprns_::expr,
T=boost::xpressive::detail::regex_impl>
]
c:\boost_1_45_0\boost\xpressive\basic_regex.hpp(118) : see
reference to function template instantiation 'void
boost::xpressive::basic_regex<BidiIter>::compile_<Expr>(const Expr
&,boost::mpl::true_)' being compiled
with
[
BidiIter=std::_String_const_iterator,
Expr=boost::proto::exprns_::expr
]
c:\othertrunk\other\misc\src\main.cpp(12) : see reference to
function template instantiation
'boost::xpressive::basic_regex<BidiIter>::basic_regex>(const
Expr &)' being compiled
with
[
BidiIter=std::_String_const_iterator,
Tag=boost::proto::tag::terminal,
Args=boost::proto::argsns_::term<char>,
Arity=0,
Expr=boost::proto::exprns_::expr
]
c:\boost_1_45_0\boost\xpressive\detail\static\transforms\as_matcher.hpp(27)
: error C4430: missing type specifier - int assumed. Note: C++ does not
support default-int
c:\boost_1_45_0\boost\xpressive\detail\static\transforms\as_matcher.hpp(27)
: error C4430: missing type specifier - int assumed. Note: C++ does not
support default-int
c:\boost_1_45_0\boost\xpressive\detail\static\transforms\as_matcher.hpp(30)
: error C2653: 'data_type' : is not a class or namespace name
c:\boost_1_45_0\boost\xpressive\detail\static\transforms\as_matcher.hpp(30)
: fatal error C1903: unable to recover from previous error(s); stopping
compilation
Build log was saved at
"file://c:\otherTrunk\libs\misc\test\vc\Debug\BuildLog.htm"
miscTest - 5 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
tia, Louis.