From 57ebd9d4039a3f724e48f909973fe663dac819ee Mon Sep 17 00:00:00 2001 From: medithe <40990424+medithe@users.noreply.github.com> Date: Thu, 25 Apr 2019 23:18:51 +0200 Subject: [PATCH] Update cheatsheet.md: Adding Lambda correction. Currently, the example where a lambda function was added to chaiscript didn't work for me. I use g++7, g++8,g++9 both with c++14 and c++17 mode. It doesn't work either in clang++-7. If the lambda is wrapped into a std::function<> it will work again! --- cheatsheet.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cheatsheet.md b/cheatsheet.md index 80d4b3a8..5e712d4e 100644 --- a/cheatsheet.md +++ b/cheatsheet.md @@ -66,7 +66,7 @@ chai.add(chaiscript::fun(static_cast(&Derived::data)), "data"); ``` chai.add( - chaiscript::fun( + chaiscript::fun>( [](bool type) { if (type) { return "x"; } else { return "y"; }