0

我有一个简单的 lambda 表达式:

EnumWindows([] (HWND hWnd, LPARAM lparam) -> BOOL {return FALSE;}, 0);

它成功地在 64 位平台上编译,但在 32 位上导致以下错误:

[CLANG Error] Unit3.cpp(15): no matching function for call to 'EnumWindows'
  winuser.h(9766): candidate function not viable: no known conversion from '<lambda at Unit3.cpp:15:14>' to 'WNDENUMPROC' (aka 'BOOL (*)(HWND, LPARAM) __attribute__((stdcall))') for 1st argument

有人有想法吗?

4

0 回答 0