[Boost-bugs] [Boost C++ Libraries] #8774: use of dectype in result_of gives errors in spirit parser on gcc-4.8.1

Subject: [Boost-bugs] [Boost C++ Libraries] #8774: use of dectype in result_of gives errors in spirit parser on gcc-4.8.1
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-07-03 17:09:02


#8774: use of dectype in result_of gives errors in spirit parser on gcc-4.8.1
------------------------------+------------------------
 Reporter: rodolfo@… | Owner: djowel
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: spirit
  Version: Boost 1.54.0 | Severity: Regression
 Keywords: |
------------------------------+------------------------
 The following snippet compiles and runs fine on boost-1.53 and earlier
 using gcc-4.8.1, but fails to compile on boost-1.54.

 {{{
 //#define BOOST_RESULT_OF_USE_TR1
 #include <boost/spirit/include/qi.hpp>
 #include <boost/spirit/include/phoenix_operator.hpp>

 int main()
 {

     namespace qi = boost::spirit::qi;
     qi::rule<const char *, void(int &)> foo = qi::int_[qi::_r1 = qi::_1];
     qi::rule<const char *, int()> start = foo(qi::_val);

     const char *beg = "5",
                *end = beg+strlen(beg);

     int val;
     if(parse(beg, end, start, val))
         std::cout << val << std::endl;
     else
         std::cout << "error";
 }
 }}}

 The compile error output is attached to this ticket. The error goes away
 by uncommenting the first line.

 It seems that boost-1.54 enables by default the use of decltype in the
 implementation of boost::result_of but it isn't doing what it's suppose to
 do.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8774>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:13 UTC