Index: boost/proto/transform/arg.hpp
===================================================================
--- boost/proto/transform/arg.hpp (revision 56000)
+++ boost/proto/transform/arg.hpp (working copy)
@@ -157,7 +157,7 @@
/// \return proto::child_c\(e)
/// \throw nothrow
#ifdef BOOST_HAS_DECLTYPE
- result_type
+ typename mpl::if_c::value, result_type &, result_type>::type
#else
typename result_of::child_c::type
#endif
Index: libs/proto/test/matches.cpp
===================================================================
--- libs/proto/test/matches.cpp (revision 56000)
+++ libs/proto/test/matches.cpp (working copy)
@@ -173,6 +173,7 @@
assert_matches< terminal >( as_expr("hello") );
assert_not_matches< if_()> >( lit("hello") );
+ assert_not_matches< if_, int>()> >( lit("hello") );
assert_matches< terminal >( lit(std::string("hello")) );
assert_matches< terminal >( as_child(std::string("hello")) );