title: Can placeholder be used with ref()
body: <p>I am using c++11 features and just experimented the following code:</p>
  
  <pre><code>void dump(ostream &amp;os, const MyType &amp;mt)
  {
  
  }
  
  void f(const vector&lt;MyType&gt; &amp;mts, ostream &amp;os)
  {
     for_each(mts.begin(), mts.end(), bind(dump, ref(os), ref(_1));
  }
  </code></pre>
  
  <p>This code compiles wrong at clang:</p>
  
  <pre><code>/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/bits/stl_algo.h:4417:2: error: no matching function for call to object of type
        'std::_Bind&lt;void (*(std::reference_wrapper&lt;std::basic_ostream&lt;char&gt; &gt;, std::reference_wrapper&lt;const std::_Placeholder&lt;1&gt; &gt;))(std::basic_ostream&lt;char&gt;
        &amp;, const MyType &amp;)&gt;'
          __f(*__first);
  </code></pre>
  
  <p>If I strip <code>ref</code> from <code>_1</code>, it compile fine:</p>
  
  <pre><code>for_each(mts.begin(), mts.end(), bind(dump, ref(os), _1);
  </code></pre>
  
  <p>Seems like placeholder does not go with reference, but just like to confirm, can you list the semantic definition why it does not? Is it actually already passed by reference?</p>