passing movable object by value to NOT operator overloading
<p>What's wrong here?</p>

<pre><code>class A {
  A(const A&amp;); //no copy constructor
  A&amp; operator= (const A&amp;); //no copy assignment
public:
  bool x;
  A(bool _x):x(_x){}
  A(A&amp;&amp; a):x(a.x); //move constructor
  A&amp; operator= (A&amp;&amp; a){x = a.x; return *this;} //move assignment
};
A operator&amp;&amp; (A a, A b) {return A(a.x &amp;&amp; b.x);} //this works

A operator! (A&amp;&amp; a) {return A(!(a.x));} //this also works

//but if instead I use 
A operator! (A a) {return A(!(a.x));} 
//it leads to linker error for missing copy constructor.
</code></pre>

<p>Well, of course I can pass argument by r-reference. It does not make much sense to pass-by-value objects that are known to be non-copyable. But still, why passing by value works with "&amp;&amp;" and fails with "!"?</p>

<p>Edit: I found that error occures only when I use this operator in a following way:</p>

<pre><code>A f(bool x) {return A(x);}
std::vector&lt;A&gt; v;
v.push_back(!f(true));
</code></pre>

<p>If I remove "!" from last line, it compiles.
Does standard says something about it? Maybe it's just my old MSVC2010 compiler problem?</p>