Opened 10 years ago

Last modified 10 years ago

#7809 closed Bugs

compiler errors with gcc in c++11 mode — at Initial Version

Reported by: Nathan Ridge Owned by: Eric Niebler
Milestone: To Be Determined Component: xpressive
Version: Boost Development Trunk Severity: Regression
Keywords: Cc:

Description

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

Change History (0)

Note: See TracTickets for help on using tickets.