Fix Mac compile errors
Created by: JiayiFeng
Issue:
/Users/baidu/Documents/git_workspace/Paddle/paddle/utils/tests/test_CustomStackTrace.cpp:43:44: error: lambda capture 'countDown' is not required to be captured for this use [-Werror,-Wunused-lambda-capture]
&countDown,
^
/Users/baidu/Documents/git_workspace/Paddle/paddle/utils/tests/test_CustomStackTrace.cpp:44:44: error: lambda capture 'layerSize' is not required to be captured for this use [-Werror,-Wunused-lambda-capture]
&layerSize,
^
2 errors generated.
make[2]: *** [paddle/utils/tests/CMakeFiles/test_CustomStackTrace.dir/test_CustomStackTrace.cpp.o] Error 1
make[1]: *** [paddle/utils/tests/CMakeFiles/test_CustomStackTrace.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Solution:
Remove line 43 and line 44. For countDown
and layerSize
are constexpr
,which means they can be used in lambda without being captured.