Hi! It's my understanding there's a typo in this C++ example. I assume the author wanted to have a lambda function that returned a double. I've opened a PR with the correct example as I understand it. Thanks!