From 1958bad23e858d242eaf6f5c4aff8e639744b30e Mon Sep 17 00:00:00 2001 From: yhirose Date: Sat, 3 Sep 2022 08:46:33 -0400 Subject: [PATCH] Fix problem with set_logger --- peglib.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/peglib.h b/peglib.h index 0591b1f..fe4f092 100644 --- a/peglib.h +++ b/peglib.h @@ -4616,8 +4616,8 @@ public: void set_logger( std::function log) { - log_ = [&](size_t line, size_t col, const std::string &msg, - const std::string & /*rule*/) { log(line, col, msg); }; + log_ = [log](size_t line, size_t col, const std::string &msg, + const std::string & /*rule*/) { log(line, col, msg); }; } private: