Problem
$ cling -std=c++14 -xcuda
****************** CLING ******************
* Type C++ code and press enter to run it *
* Type .q to exit *
*******************************************
[cling]$ auto lambda = [](auto x, auto y) {return x + y;}
((lambda) &) @0x7f7df8b52018
[cling]$ lambda(3.7, 2.8)
input_line_5:2:2: error: type '(lambda at input_line_3:2:16)' does not provide a call operator
lambda(3.7, 2.8)
^~~~~~
IncrementalCUDADeviceCompiler::process()
failed at compile ptx code
(double) 6.5000000
[cling]$ .q
Hint
Set C++14 on the device compiler works.
$ cling -std=c++11 -xcuda
****************** CLING ******************
* Type C++ code and press enter to run it *
* Type .q to exit *
*******************************************
[cling]$ auto lambda = [](auto x, auto y) {return x + y;}
input_line_3:2:19: error: 'auto' not allowed in lambda parameter
auto lambda = [](auto x, auto y) {return x + y;}
^~~~
input_line_3:2:27: error: 'auto' not allowed in lambda parameter
auto lambda = [](auto x, auto y) {return x + y;}
^~~~
IncrementalCUDADeviceCompiler::process()
failed at compile ptx code
input_line_3:2:19: error: 'auto' not allowed in lambda parameter
auto lambda = [](auto x, auto y) {return x + y;}
^~~~
input_line_3:2:27: error: 'auto' not allowed in lambda parameter
auto lambda = [](auto x, auto y) {return x + y;}
^~~~
Problem
Hint
Set C++14 on the device compiler works.