Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::reg_expression and basic_regex
From: John Maddock (boost.regex_at_[hidden])
Date: 2010-05-24 11:42:11


> I have been using the regular expressions with the older version of
> boost::regex, But with the latest version I'm getting the below error.
> I understand reg_expression is deprecated and need to use basic_regex. But
> even with that, its the same error.
>
> Any ideas on this, would be more useful.
>
> typedef boost::reg_expression<char, boost::c_regex_traits<char>,
> ntl::list_alloc<char> > Exp_type;
>
> ../../../include/expr/ExprEngine.h:38: error: wrong number of template
> arguments (3, should be 2)
> ../../../include/boost/regex/v4/basic_regex.hpp:597: error: provided for
> 'template<class charT, class traits> class boost::reg_expression'

Looks like the final Allocator template parameter got dropped about 7 years
ago from reg_expression... and no one noticed!

Remove the Allocator parameter and everything should be OK (this is
documented for basic_regex BTW:
http://www.boost.org/doc/libs/1_43_0/libs/regex/doc/html/boost_regex/ref/basic_regex.html).

HTH, John.


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