[xpressive] compiler errors in c++11 mode with trunk

Hello, 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/boost/xpressive/detail/core/regex_impl.hpp:21:0, from boost/boost/xpressive/match_results.hpp:54, from boost/boost/xpressive/detail/core/access.hpp:21, from boost/boost/xpressive/detail/core/state.hpp:18, from boost/boost/xpressive/detail/core/matcher/alternate_end_matcher.hpp:20, from boost/boost/xpressive/detail/core/matchers.hpp:17, from boost/boost/xpressive/regex_primitives.hpp:22, from boost/boost/xpressive/xpressive_static.hpp:24, from test.cpp:2: boost/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/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/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/boost/xpressive/regex_algorithms.hpp:916:5: required from 'BidiContainer boost::xpressive::regex_replace(BidiContainer&, const boost::xpressive::basic_regex<BidiIter>&, const typename boost::iterator_value<BidiIter>::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<BidiIter>::type = char; typename boost::disable_if<boost::xpressive::detail::is_char_ptr<BidiRange> >::type = void]' test.cpp:7:53: required from here boost/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> > > >' 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). Any suggestions for a fix/workaround? Thanks, Nate

On 12/18/2012 12:32 AM, Nathan Ridge wrote:
<snip>
boost/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> > > >'
Ah! Thanks for the report. Would you mind opening a Trac ticket for this? I'll try to get it fixed for 1.53. -- Eric Niebler BoostPro Computing http://www.boostpro.com

Ah! Thanks for the report. Would you mind opening a Trac ticket for this? I'll try to get it fixed for 1.53.
I filed https://svn.boost.org/trac/boost/ticket/7809 Thanks! Nate
participants (2)
-
Eric Niebler
-
Nathan Ridge