Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/164.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 为什么编译器没有在修饰为宏函数参数的参数列表(lambdas)中看到断点_C++_Lambda_Macros_Runtime_Breakpoints - Fatal编程技术网

C++ 为什么编译器没有在修饰为宏函数参数的参数列表(lambdas)中看到断点

C++ 为什么编译器没有在修饰为宏函数参数的参数列表(lambdas)中看到断点,c++,lambda,macros,runtime,breakpoints,C++,Lambda,Macros,Runtime,Breakpoints,有密码吗 定义: template <typename T> void callback(T&& lambda); #define CALLBACK(lambda) callback(lambda) callback([=]{ printf("Hi man!"); // first case: here can be placed breakpoint }); CALLBACK([=]{ printf("Hi again!"); // seco

有密码吗

定义

template <typename T>
void callback(T&& lambda);

#define CALLBACK(lambda) callback(lambda)
callback([=]{
   printf("Hi man!");   // first case: here can be placed breakpoint
});

CALLBACK([=]{
   printf("Hi again!");  // second case: breakpoint can't be placed here
});
在第一种情况下,断点可以放在lambda内部。但在第二种情况下(用宏修饰)不能。为什么?有办法解决吗


你在使用什么编译器?@NathanOliver,VS2015nvm。可以确认。你在用什么编译器?@NathanOliver,VS2015nvm。我可以证实。