Ticket #3338: proto-3338.patch

File proto-3338.patch, 1.2 KB (added by François Barel <frabar666@…>, 13 years ago)

Same fix for _child_c

  • boost/proto/transform/arg.hpp

     
    157157            /// \return <tt>proto::child_c\<N\>(e)</tt>
    158158            /// \throw nothrow
    159159            #ifdef BOOST_HAS_DECLTYPE
    160             result_type
     160            typename mpl::if_c<is_array<result_type>::value, result_type &, result_type>::type
    161161            #else
    162162            typename result_of::child_c<typename impl::expr_param, N>::type
    163163            #endif
  • libs/proto/test/matches.cpp

     
    173173    assert_matches< terminal<char [N]> >( as_expr("hello") );
    174174
    175175    assert_not_matches< if_<is_same<_value, int>()> >( lit("hello") );
     176    assert_not_matches< if_<is_same<_child_c<0>, int>()> >( lit("hello") );
    176177
    177178    assert_matches< terminal<std::string> >( lit(std::string("hello")) );
    178179    assert_matches< terminal<std::string> >( as_child(std::string("hello")) );