title: Perfect forwarding workaround for bit-fields
body: <p>I’m looking for a workaround for <a href="https://stackoverflow.com/questions/14026202/bit-field-in-overload-resolution-for-template">bit-field in overload resolution for template</a>.</p>
  
  <p>I have a function that I templated for perfect forwarding of its arguments:</p>
  
  <pre><code>template &lt;typename... Args&gt; void f(Args &amp;&amp;...args) { }
  </code></pre>
  
  <p>If I try to use it with a bit-field argument, like this:</p>
  
  <pre><code>struct bits { unsigned int foo:1; };
  bits b{1};
  f(b.foo);
  </code></pre>
  
  <p>…it fails to compile:</p>
  
  <pre>main.cpp:26:7: error: non-const reference cannot bind to bit-field 'foo'
      f(b.foo);
        ^~~~~</pre>
  
  <p><strong>Is there a way to overload <code>f()</code> such that it takes bit-fields by value but still takes other arguments by reference in the common case?</strong></p>
  
  <p>So far I haven't been able to. For instance, if I add an overload that takes arguments by value…</p>
  
  <pre>main.cpp:27:5: error: call to 'f' is ambiguous
      f(b.foo);
      ^</pre>