Boost C++ Libraries: Ticket #3712: Bug in xpressive https://svn.boost.org/trac10/ticket/3712 <p> Hello, </p> <p> 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: </p> <p> #include &lt;vector&gt; #include &lt;boost/xpressive/xpressive.hpp&gt; </p> <p> typedef boost::xpressive::basic_regex&lt;std::string::const_iterator&gt; regex_t; </p> <p> int main(int argc, char* argv[]) { </p> <blockquote> <p> std::vector&lt;regex_t&gt; vector; vect.push_back(regex_t()); </p> </blockquote> <p> </p> <blockquote> <p> return 0; </p> </blockquote> <p> } </p> <p> Compiler output: </p> <p> cd '/home/segurmatica/console_filter/debug' &amp;&amp; WANT_AUTOCONF_2_5="1" WANT_AUTOMAKE_1_6="1" LC_MESSAGES="C" LC_CTYPE="C" gmake -k gmake all-recursive Making all in src compiling console_filter.cpp (g++) In file included from /usr/local/lib/gcc/i686-pc-linux-gnu/4.4.2/../../../../include/c++/4.4.2/vector:63, from /home/segurmatica/console_filter/src/console_filter.cpp:1: /usr/local/lib/gcc/i686-pc-linux-gnu/4.4.2/../../../../include/c++/4.4.2/bits/stl_construct.h: In static member function 'static void std::_Destroy_aux&lt;&lt;anonymous&gt; &gt;::<span class="underline">destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = boost::xpressive::basic_regex&lt;</span>gnu_cxx::<span class="underline">normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;*, bool &lt;anonymous&gt; = false]': /usr/local/lib/gcc/i686-pc-linux-gnu/4.4.2/../../../../include/c++/4.4.2/bits/stl_construct.h:116: instantiated from 'void std::_Destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = boost::xpressive::basic_regex&lt;</span>gnu_cxx::<span class="underline">normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;*]' /usr/local/lib/gcc/i686-pc-linux-gnu/4.4.2/../../../../include/c++/4.4.2/bits/stl_construct.h:142: instantiated from 'void std::_Destroy(_ForwardIterator, _ForwardIterator, std::allocator&lt;_T2&gt;&amp;) [with _ForwardIterator = boost::xpressive::basic_regex&lt;</span>gnu_cxx::<span class="underline">normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;*, _Tp = boost::xpressive::basic_regex&lt;</span>gnu_cxx::<span class="underline">normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;]' /usr/local/lib/gcc/i686-pc-linux-gnu/4.4.2/../../../../include/c++/4.4.2/bits/stl_vector.h:313: instantiated from 'std::vector&lt;_Tp, _Alloc&gt;::~vector() [with _Tp = boost::xpressive::basic_regex&lt;</span>gnu_cxx::<span class="underline">normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;, _Alloc = std::allocator&lt;boost::xpressive::basic_regex&lt;__gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt; &gt;]' /home/segurmatica/console_filter/src/console_filter.cpp:8: instantiated from here /usr/local/lib/gcc/i686-pc-linux-gnu/4.4.2/../../../../include/c++/4.4.2/bits/stl_construct.h:93: error: no matching function for call to '_Destroy(const boost::proto::exprns_::expr&lt;boost::proto::tag::address_of, boost::proto::argsns_::list1&lt;boost::xpressive::basic_regex&lt;__gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt;&amp;&gt;, 1l&gt;)' gmake<a class="changeset" href="https://svn.boost.org/trac10/changeset/2" title="Add Boost Disclaimer">[2]</a>: <strong>* [console_filter.o] Error 1 gmake<a class="changeset" href="https://svn.boost.org/trac10/changeset/2" title="Add Boost Disclaimer">[2]</a>: Target `all' not remade because of errors. gmake<a class="changeset" href="https://svn.boost.org/trac10/changeset/2" title="Add Boost Disclaimer">[2]</a>: Nothing to be done for `all-am'. gmake<a class="changeset" href="https://svn.boost.org/trac10/changeset/1" title="Import core sources for SVNmanger 0.38 ">[1]</a>: </strong>* [all-recursive] Error 1 gmake: <strong>* [all] Error 2 </strong>* Exited with status: 2 <strong>* </strong></span></p> <p> I'm using gcc 4.4.2 and boost 1.41 </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3712 Trac 1.4.3 Eric Niebler Fri, 11 Dec 2009 01:10:05 GMT <link>https://svn.boost.org/trac10/ticket/3712#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3712#comment:1</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/58281" title="disable proto's unary operator&amp; for basic_regex objects, references #3712">[58281]</a>) disable proto's unary operator&amp; for basic_regex objects, references <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3712" title="#3712: Bugs: Bug in xpressive (closed: fixed)">#3712</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Eric Niebler</dc:creator> <pubDate>Tue, 05 Jan 2010 01:38:18 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/3712#comment:2 https://svn.boost.org/trac10/ticket/3712#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket