diff --git a/src/tactic/core/elim_uncnstr_tactic.cpp b/src/tactic/core/elim_uncnstr_tactic.cpp index ed54b6768..b8b4334f4 100644 --- a/src/tactic/core/elim_uncnstr_tactic.cpp +++ b/src/tactic/core/elim_uncnstr_tactic.cpp @@ -867,8 +867,7 @@ class elim_uncnstr_tactic : public tactic { void run(goal_ref const & g, goal_ref_buffer & result) { bool produce_proofs = g->proofs_enabled(); TRACE("goal", g->display(tout);); - std::function coll = [&](statistics& st) { collect_statistics(st); }; - statistics_report sreport(coll); + statistics_report sreport([&](statistics& st) { collect_statistics(st); }); tactic_report report("elim-uncnstr", *g); m_vars.reset(); collect_occs p; diff --git a/src/tactic/tactic.h b/src/tactic/tactic.h index c43120943..ddd187337 100644 --- a/src/tactic/tactic.h +++ b/src/tactic/tactic.h @@ -120,7 +120,7 @@ class statistics_report { std::function m_collector; public: statistics_report(tactic& t):m_tactic(&t) {} - statistics_report(std::function& coll): m_collector(coll) {} + statistics_report(std::function&& coll): m_collector(std::move(coll)) {} ~statistics_report(); };