Boost C++ Libraries: Ticket #7809: compiler errors with gcc in c++11 mode https://svn.boost.org/trac10/ticket/7809 <p> The following code: </p> <pre class="wiki">#include &lt;string&gt; #include &lt;boost/xpressive/xpressive_static.hpp&gt; void foo(const boost::xpressive::sregex&amp; regex) { std::string input; boost::xpressive::regex_replace(input, regex, ""); } </pre><p> when compiled with GCC (I tested with 4.6/4.7/4.8) in C++11 mode, gives the following compiler error: </p> <pre class="wiki">In file included from ./boost/xpressive/detail/core/regex_impl.hpp:21:0, from ./boost/xpressive/match_results.hpp:54, from ./boost/xpressive/detail/core/access.hpp:21, from ./boost/xpressive/detail/core/state.hpp:18, from ./boost/xpressive/detail/core/matcher/alternate_end_matcher.hpp:20, from ./boost/xpressive/detail/core/matchers.hpp:17, from ./boost/xpressive/regex_primitives.hpp:22, from ./boost/xpressive/xpressive_static.hpp:24, from test.cpp:2: ./boost/xpressive/detail/utility/tracking_ptr.hpp: In instantiation of 'struct boost::xpressive::detail::tracking_ptr&lt;boost::xpressive::detail::regex_impl&lt;__gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char&gt; &gt; &gt; &gt;': ./boost/proto/detail/preprocessed/expr_variadic.hpp:50:49: required from 'struct boost::proto::exprns_::expr&lt;boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term&lt;boost::xpressive::detail::tracking_ptr&lt;boost::xpressive::detail::regex_impl&lt;__gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char&gt; &gt; &gt; &gt; &gt;, 0l&gt;' ./boost/xpressive/basic_regex.hpp:53:8: required from 'struct boost::xpressive::basic_regex&lt;__gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char&gt; &gt; &gt;' ./boost/xpressive/regex_algorithms.hpp:916:10: required from 'BidiContainer boost::xpressive::regex_replace(BidiContainer&amp;, const boost::xpressive::basic_regex&lt;BidiIter&gt;&amp;, const typename boost::iterator_value&lt;Base&gt;::type*, boost::xpressive::regex_constants::match_flag_type, typename boost::disable_if&lt;boost::xpressive::detail::is_char_ptr&lt;BidiRange&gt; &gt;::type*) [with BidiContainer = std::basic_string&lt;char&gt;; BidiIter = __gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char&gt; &gt;; typename boost::iterator_value&lt;Base&gt;::type = char; typename boost::disable_if&lt;boost::xpressive::detail::is_char_ptr&lt;BidiRange&gt; &gt;::type = void]' test.cpp:7:53: required from here ./boost/xpressive/detail/utility/tracking_ptr.hpp:440:73: error: no type named 'unspecified_bool_type' in 'class boost::intrusive_ptr&lt;boost::xpressive::detail::regex_impl&lt;__gnu_cxx::__normal_iterator&lt;const char*, std::basic_string&lt;char&gt; &gt; &gt; &gt;' typedef typename intrusive_ptr&lt;element_type&gt;::unspecified_bool_type unspecified_bool_type; ^ </pre><p> It works fine if I don't compile in C++11 mode. It used to work fine even in C++11 mode in the 1.51 release (don't have 1.52 around to test ATM). </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7809 Trac 1.4.3 Nathan Ridge Wed, 19 Dec 2012 05:38:32 GMT description changed https://svn.boost.org/trac10/ticket/7809#comment:1 https://svn.boost.org/trac10/ticket/7809#comment:1 <ul> <li><strong>description</strong> modified (<a href="/trac10/ticket/7809?action=diff&amp;version=1">diff</a>) </li> </ul> Ticket Eric Niebler Wed, 19 Dec 2012 18:57:30 GMT <link>https://svn.boost.org/trac10/ticket/7809#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7809#comment:2</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/82103" title="accomodate recent changes to boost's smart pointers, refs #7809">[82103]</a>) accomodate recent changes to boost's smart pointers, refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7809" title="#7809: Bugs: compiler errors with gcc in c++11 mode (closed: fixed)">#7809</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Eric Niebler</dc:creator> <pubDate>Thu, 03 Jan 2013 18:26:53 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/7809#comment:3 https://svn.boost.org/trac10/ticket/7809#comment:3 <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> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/82334" title="merge [82103] from trunk, fixes #7809, permission from Marshall">[82334]</a>) merge <a class="changeset" href="https://svn.boost.org/trac10/changeset/82103" title="accomodate recent changes to boost's smart pointers, refs #7809">[82103]</a> from trunk, fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/7809" title="#7809: Bugs: compiler errors with gcc in c++11 mode (closed: fixed)">#7809</a>, permission from Marshall </p> Ticket