2

ラムダ式に問題があり、コンパイラがクラッシュします (VC10)。

文字列でboost::trimを使用した場合にのみクラッシュするようです。なぜこれが起こるのか、その動作を修正する方法について論理的な説明はありますか? または、 lambda 内で手動でトリミングする必要がありますか?

これは、クラッシュの原因となるサンプル コードです。

CreateBtn.MouseUpEvent += ([this](const input::MouseEventArgs& args)
{
    Res.BlendBaseName = BlendTb.GetText(); 
    //boost::trim(Res.BlendBaseName); this line causes compiler internal error
});

MouseUpEvent は、 std::functions のベクトルをラップするだけのクラスのオブジェクトです。これが何らかの形で役立つ場合。

ラムダの本体内から他の関数​​を呼び出すことはできますが、boost::trim は失敗します。私にはコンパイラのバグのようです。何か案は?

編集:これは出力ウィンドウのメッセージです:

1>d:\development\lame\lame_framework_test\editormode.h(243): fatal error C1001: An internal error has occurred in the compiler.
1>  (compiler file 'msc1.cpp', line 1420)
4

0 に答える 0