I am having a problem with lambda expression causing compiler to crash (VC10).
It only seems to crash when I use boost::trim on a string. Is there any logical explanation to why this happens and any way to fix that behaviour ? Or will I have to do trimming manually inside the lambda ?
This is sample code that causes the crash:
CreateBtn.MouseUpEvent += ([this](const input::MouseEventArgs& args)
{
Res.BlendBaseName = BlendTb.GetText();
//boost::trim(Res.BlendBaseName); this line causes compiler internal error
});
MouseUpEvent is object of my class that just wrapps vector of std::functions if this is helpful in any way.
Calling other functions from within the body of lambda works, but boost::trim fails. It seems to me as a compiler bug. Any ideas?
Edit: This is the message in Output Window:
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)