Is it allowed to assign to a dereferenced this (*this)?
<p>I'm currently refreshing my C++ skills and was wondering if it is possible to assign something to <code>*this</code>.
I know assigning to <code>this</code> is forbidden, but can't find the same information for my case.</p>

<p>An example:</p>

<pre><code>class Foo {
  int x;
public:
  Foo(int x) : x(x) {}
  Foo incr() { return Foo(x+1); }
  void incr_() { (*this) = incr(); }
};
</code></pre>

<p>Edit: corrected <code>incr()</code>'s return type from <code>void</code> to <code>Foo</code>.</p>
