About lambdas, conversions to function pointers and visibility of private data members : <p>Consider the following example:</p>

<pre><code>#include &lt;cassert&gt;

struct S {
    auto func() { return +[](S &amp;s) { s.x++; }; }
    int get() { return x; }

private:
    int x{0};
};

int main() {
    S s;
    s.func()(s);
    assert(s.get() == 1);
}
</code></pre>

<p>It compiles both with G++ and clang, so I'm tempted to expect that is allowed by the standard.
However, the lambda has no capture list and it cannot have it because of the <code>+</code> that forces the conversion to a function pointer. Therefore, I expected it was not allowed to access private data members of <code>S</code>.<br>
Instead, it behaves more or less how if it was defined as a static member function.</p>

<p>So far, so good. If I knew it before, I would have used this trick often to avoid writing redundant code.</p>

<p>What I'd like to know now is where in the standard (the working draft is fine) this is defined, for I've not been able to find the section, the bullet or whatever that rules about it.<br>
Is there any limitation for the lambda or it works <em>exactly</em> as if it was defined as a static member function?</p>
