Boost Users :
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:
> 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;
> return 0;
> Compiler output:
> error: no matching function for call to '_Destroy(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.
-- Eric Niebler BoostPro Computing http://www.boostpro.com
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