Modify

Ticket #7809 (closed Bugs: fixed)

Opened 16 months ago

Last modified 16 months ago

compiler errors with gcc in c++11 mode

Reported by: nathanridge Owned by: eric_niebler
Milestone: To Be Determined Component: xpressive
Version: Boost Development Trunk Severity: Regression
Keywords: Cc:

Description (last modified by nathanridge) (diff)

The following code:

#include <string>
#include <boost/xpressive/xpressive_static.hpp>

void foo(const boost::xpressive::sregex& regex)
{
    std::string input;
    boost::xpressive::regex_replace(input, regex, "");
}

when compiled with GCC (I tested with 4.6/4.7/4.8) in C++11 mode, gives the following compiler error:

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<boost::xpressive::detail::regex_impl<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char> > > >':
./boost/proto/detail/preprocessed/expr_variadic.hpp:50:49:   required from 'struct boost::proto::exprns_::expr<boost::proto::tagns_::tag::terminal, boost::proto::argsns_::term<boost::xpressive::detail::tracking_ptr<boost::xpressive::detail::regex_impl<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char> > > > >, 0l>'
./boost/xpressive/basic_regex.hpp:53:8:   required from 'struct boost::xpressive::basic_regex<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char> > >'
./boost/xpressive/regex_algorithms.hpp:916:10:   required from 'BidiContainer boost::xpressive::regex_replace(BidiContainer&, const boost::xpressive::basic_regex<BidiIter>&, const typename boost::iterator_value<Base>::type*, boost::xpressive::regex_constants::match_flag_type, typename boost::disable_if<boost::xpressive::detail::is_char_ptr<BidiRange> >::type*) [with BidiContainer = std::basic_string<char>; BidiIter = __gnu_cxx::__normal_iterator<const char*, std::basic_string<char> >; typename boost::iterator_value<Base>::type = char; typename boost::disable_if<boost::xpressive::detail::is_char_ptr<BidiRange> >::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<boost::xpressive::detail::regex_impl<__gnu_cxx::__normal_iterator<const char*, std::basic_string<char> > > >'
     typedef typename intrusive_ptr<element_type>::unspecified_bool_type unspecified_bool_type;
                                                                         ^

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).

Attachments

Change History

comment:1 Changed 16 months ago by nathanridge

  • Description modified (diff)

comment:2 Changed 16 months ago by eric_niebler

(In [82103]) accomodate recent changes to boost's smart pointers, refs #7809

comment:3 Changed 16 months ago by eric_niebler

  • Status changed from new to closed
  • Resolution set to fixed

(In [82334]) merge [82103] from trunk, fixes #7809, permission from Marshall

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.