$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] xpressive compilation error
From: Eric Niebler (eric_at_[hidden])
Date: 2009-12-02 21:46:40
Pablo Hernández Valdés wrote:
> Hello,
> 
> I used to had an old version of boost (I don't remember exactly which) and
> my code worked fine. Now I updated to the last version and I started to
> receive compilation errors in linux when using a std::vector with regular
> expressions from boost::xpressive, in windows it compiles fine. 
> This code doesn't compile:
> 
> #include <vector>
> #include <boost/xpressive/xpressive.hpp>
> 
> typedef boost::xpressive::basic_regex<std::string::const_iterator> regex_t;
> 
> int main(int argc, char* argv[])
> {
> 	std::vector<regex_t> vector;
> 	vect.push_back(regex_t());
> 	
> 	return 0;
> }
> 
> Compiler output:
<snip>
> error: no matching function for call to '_Destroy(const
> boost::proto::exprns_::expr<boost::proto::tag::address_of,
> boost::proto::argsns_::list1<boost::xpressive::basic_regex<__gnu_cxx::__normal_iterator<const
> char*, std::basic_string<char, std::char_traits<char>, std::allocator<char>
>>>> &>, 1l>)'
This is arguably a bug in gcc's vector implementation in that it doesn't 
work property with types that have overloaded unary operator&. It's 
possible that I might be able to work around the problem in xpressive. 
Feel free to file a bug against xpressive at svn.boost.org. You should 
also file a bug against gcc at gcc.gnu.org/bugzilla.
Thanks,
-- Eric Niebler BoostPro Computing http://www.boostpro.com