答えて
ちょうど[=]
を使用してください。これは暗黙のうちに取得されます。コピーでキャプチャしたくない他の変数がある場合は、[this]
をキャプチャしてください。
ちょうど理解のために、なぜ[[&] '? –
@ bash.d: 'this 'はコピーでしか捕捉できません。すなわち' [this] 'や' [=] 'です。 –
@JesseGoodよろしくお願いします。 –
あなたは可能性だけで再キャプチャthis
:
class A
{
void f() {}
void g()
{
[this]()
{
f();
[this]()
// ^^^^
{
f();
};
};
}
};
私のVS2010では動作しません。 – user1899020
@ user1899020:OK、VS2010を使用する場所がわからないので、そこでテストしませんでした。 VC10のlambdaの実装は準拠していないと思います。 –
@ user1899020 VS10はLambda V1.0のみをサポートし、V1.1はサポートしていないようです。http://blogs.msdn.com/b/vcblog/archive/2010/04/06/c-0x-core-language -features-in-vc10-the-table.aspx。 – inf
- 1. が<a href="https://en.wikipedia.org/wiki/Fixed-point_combinator#Lazy_functional_implementation" rel="nofollow">this wikipedia page section</a>による</p> <p>...機能を
- 2. スカラ:</p> <pre><code>val s = """<body> <p>This is a test</p> <p>This is a test 2</p> </body""" </code></pre> <p>ここでの問題はとき、次のとおりです、改行を交換して、タブ文字列
- 3. 私はリストについて<a href="http://youtu.be/ZbXSOX2kHys" rel="nofollow">this animation</a></p> <p>を作成しようとしているUICollectionView
- 4. Lambda Func <>とFluent
- 5. 、XHTML <a href="http://validator.w3.org/" rel="nofollow noreferrer">this</a>によると
- 6. <a href="http://www.iol.ie/~murtaghd/stef/service.html" rel="nofollow noreferrer">this page</a>で
- 7. <a href="http://www.sislands.com/coin70/week6/encoder.htm" rel="nofollow">this</a>ページ内のURLパーセントエンコーディング
- 8. SQL Serverの/ TSQL:短い名前が悪い</p> <pre><code>TABLE Name WANTED: ----------------- Done This Barcel Barcelona This Paris Parisinos This </code></pre> <p>:クエリは、大きな名前の行
- 9. 関数へのLambdaメソッドの参照<F,T> NoClassDefFoundErrorをスローする
- 10. データフローwordcount.py例[<a href="https://github.com/GoogleCloudPlatform/DataflowPythonSDK#status-of-this-" rel="nofollow">https://github.com/GoogleCloudPlatform/DataflowPythonSDK#status-of-this-</a>リリース]の指示に従いUbuntuの14.04、 データフローのPython SDK</p> <p>を使用して
- 11. <a>タグからjavacript関数に参照 'this'を渡す方法
- 12. はどのように、</p> <pre><code>f :: a -> b g :: b -> c h :: c -> d </code></pre> <p>ハスケル
- 13. 'this'ポインタを 'std :: stack <_Ty>'から 'std :: stack <_Ty>&'
- 14. <a href="javascript:foo(this)"> passes Window, I want the tag element itself
- 15. SQL照会select * <this>の場合は<condition>
- 16. 配列内の関数の1つが約束を返さない場合、$ q.allを使用できますか?機能の</p> <pre><code>homeWordsResolve =(): ng.IPromise<any> => { var self = this; return this.$q.all([ self.ens.getUserProfile(), self.wos.getWordsOrderBy(), self.wos.getPos() ]); } </code></pre> <p>しかし1は同期で、ちょうどvoidを返す:
- 17. <a href="https://jsfiddle.net/wdta5v3q/" rel="nofollow noreferrer">this jsfiddle</a>にあるように、コンテナ(ブートストラップ)
- 18. すべてのlambda引数はF#
- 19. スカラ:ここ</p> <pre class="lang-py prettyprint-override"><code>def f((a, b)): return a + b d = (1, 2) f(d) </code></pre> <p>タプルに渡されては<code>f</code>に渡されながら分解されている:私はこれを行うことができますPythonで
- 20. </p> <pre><code>function f() { ... } </code></pre> <p>を考慮しないパラメータ
- 21. AfxBeginThreadは安全ですか? <a href="http://members.cox.net/doug_web/threads.htm" rel="nofollow">this webpage</a>によると
- 22. のGimp:Pythonスクリプトは、私が<a href="http://www.ibm.com/developerworks/library/os-autogimp/" rel="noreferrer">this</a>チュートリアルに従っ
- 23. Tabキーは、私が<a href="http://%20http://tulipindia.biz/associate_form.php" rel="nofollow">this form</a>を持って
- 24. Magento:<?php echo $ this-> getChildHtml( 'content')?>
- 25. HtmlExtensions for this HtmlHelper <TModel> htmlHelper
- 26. 私は<a href="http://github.com/llazzaro/lsa_python" rel="nofollow">this code on github</a>を実行したいスパイダー
- 27. 非スタティック式<Func<X>> 'this'へのアクセス
- 28. 出力はIが<a href="http://java.ociweb.com/mark/clojure/article.html">this</a>ガイドからこのコードを試み
- 29. 複製<a href="http://www.javamex.com/tutorials/regular_expressions/splitting_tokenisation_performance.shtml" rel="noreferrer">this</a>に励まされStringTokenizerは
- 30. は私が<a href="https://www.mercurial-scm.org/quickstart" rel="nofollow noreferrer">this article</a>に従っ
@JesseGood、他の人 - それはMSVSについてではありませんので、これは、他の質問のだまされやすい人ではありません。 – einpoklum