Boost logo

Boost Users :

Subject: [Boost-users] xpressive
From: Louis Lavery (Louis_at_[hidden])
Date: 2011-05-05 09:59:21


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 <boost/xpressive/xpressive_static.hpp>

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<Expr,State,Data>'
being compiled
         with
         [
             Expr=const
boost::proto::exprns_::expr<boost::proto::tag::terminal,boost::proto::argsns_::term<char>,0>
&,
             State=boost::xpressive::detail::end_xpression,
 
Data=boost::xpressive::detail::xpression_visitor<std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char>>,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<Expr,State,Data>'
being compiled
         with
         [
             Grammar=boost::xpressive::grammar_detail::as_matcher,
             Expr=const
boost::proto::exprns_::expr<boost::proto::tag::terminal,boost::proto::argsns_::term<char>,0>
&,
             State=boost::xpressive::detail::end_xpression,
 
Data=boost::xpressive::detail::xpression_visitor<std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char>>,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<Expr,State,Data>' being compiled
         with
         [
 
Cases=boost::xpressive::grammar_detail::Cases<char,boost::xpressive::Grammar<char>>,
             Expr=const
boost::proto::exprns_::expr<boost::proto::tag::terminal,boost::proto::argsns_::term<char>,0>
&,
             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<Xpr,BidiIter,traits_type>(const
Xpr &,const boost::shared_ptr<T> &,const Traits &)' being compiled
         with
         [
 
Xpr=boost::proto::exprns_::expr<boost::proto::tag::terminal,boost::proto::argsns_::term<char>,0>,
 
BidiIter=std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char>>,
 
T=boost::xpressive::detail::regex_impl<std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char>>>,
             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<Xpr,BidiIter>(const Xpr
&,const boost::shared_ptr<T> &)' being compiled
         with
         [
 
Xpr=boost::proto::exprns_::expr<boost::proto::tag::terminal,boost::proto::argsns_::term<char>,0>,
 
BidiIter=std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char>>,
 
T=boost::xpressive::detail::regex_impl<std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char>>>
         ]
         c:\boost_1_45_0\boost\xpressive\basic_regex.hpp(252) : see
reference to function template instantiation 'void
boost::xpressive::detail::static_compile<Expr,BidiIter>(const Xpr
&,const boost::shared_ptr<T> &)' being compiled
         with
         [
 
Expr=boost::proto::exprns_::expr<boost::proto::tag::terminal,boost::proto::argsns_::term<char>,0>,
 
BidiIter=std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char>>,
 
Xpr=boost::proto::exprns_::expr<boost::proto::tag::terminal,boost::proto::argsns_::term<char>,0>,
 
T=boost::xpressive::detail::regex_impl<std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char>>>
         ]
         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<char,std::char_traits<char>,std::allocator<char>>,
 
Expr=boost::proto::exprns_::expr<boost::proto::tag::terminal,boost::proto::argsns_::term<char>,0>
         ]
         c:\othertrunk\other\misc\src\main.cpp(12) : see reference to
function template instantiation
'boost::xpressive::basic_regex<BidiIter>::basic_regex<boost::proto::exprns_::expr<Tag,Args,Arity>>(const
Expr &)' being compiled
         with
         [
 
BidiIter=std::_String_const_iterator<char,std::char_traits<char>,std::allocator<char>>,
             Tag=boost::proto::tag::terminal,
             Args=boost::proto::argsns_::term<char>,
             Arity=0,
 
Expr=boost::proto::exprns_::expr<boost::proto::tag::terminal,boost::proto::argsns_::term<char>,0>
         ]
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.


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