diff --git a/tests/unittest.cpp b/tests/unittest.cpp index 65ceb503c..4729bfed7 100644 --- a/tests/unittest.cpp +++ b/tests/unittest.cpp @@ -1220,9 +1220,9 @@ TEST_CASE("template_function") auto t = crow::mustache::compile("attack of {{func}}"); crow::mustache::context ctx; ctx["name"] = "killer tomatoes"; - ctx["func"] = [&](std::string) { + ctx["func"] = std::function([&](std::string) { return std::string("{{name}}, IN SPACE!"); - }; + }); auto result = t.render_string(ctx); CHECK("attack of killer tomatoes, IN SPACE!" == result); }