Vadim Zeitlin
unread,Jun 12, 2012, 7:18:37 AM6/12/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wx-...@googlegroups.com
On Tue, 12 Jun 2012 03:48:38 -0700 (PDT) Big Muscle wrote:
BM> if I want use lambda function for event binding, everything works
BM> correctly in Debug build. But when compiling in Release, I get
BM> following error:
BM>
BM> wxWidgets\include\wx/event.h(535): error C2512: '`anonymous-
BM> namespace'::<lambda0>' : no appropriate default constructor available
BM>
BM> Very simple example of code causing the problem is:
BM>
BM> Bind(wxEVT_SIZE, [this](wxSizeEvent& event) { int a = 35; });
BM>
BM> Am I doing something wrong or lambda functions are not supported in
BM> Release builds?
Can you try it with g++? My first idea would be that it's a compiler bug
but if it isn't, g++ might give a more useful error message.
Regards,
VZ