title: Displaying a Flattened Phoenix Expression using Boost Fusion
body: <p>Following the <a href="http://www.boost.org/doc/libs/1_53_0/doc/html/proto/users_guide.html#boost_proto.users_guide.intermediate_form.expressions_as_fusion_sequences" rel="nofollow">Expressions as Fusion Sequences</a> section of the Proto User Guide, I get to the point where I iterate over a flattened proto expression: <code>_1 + 2 + 3 + 4</code>:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;boost/phoenix.hpp&gt;
  
  namespace proto   = boost::proto;
  namespace fusion  = boost::fusion;
  namespace phoenix = boost::phoenix;
  
  struct display
  {
    template&lt;typename T&gt;
    void operator()(T const &amp;t) const
    {
      std::cout &lt;&lt; t &lt;&lt; std::endl;
    }
  };
  
  boost::proto::terminal&lt;int&gt;::type const _1 = {1};
  
  int main(int argc, char *argv[])
  {
    fusion::for_each(
      fusion::transform(
        proto::flatten(_1 + 2 + 3 + 4)
      , proto::functional::value()
      )
    , display()
    );
    return 0;
  }
  </code></pre>
  
  <p>The <code>_1</code> placeholder is defined as shown above using <code>proto::terminal</code>. I'd also like to use
  Boost Phoenix; however, if I instead use the version of <code>_1</code> defined in <code>boost::phoenix::arg_names</code> in the call to <code>fusion::for_each</code>, I get an <strong>error: cannot bind ‘std::ostream {aka std::basic_ostream}’ lvalue to ‘std::basic_ostream&amp;&amp;’</strong>. Can I use Phoenix placeholders like this with a Fusion transform?</p>