From 902561e9c35d4679f85217c2ff23cc81604a4b0b Mon Sep 17 00:00:00 2001 From: Jos Collin Date: Tue, 2 May 2017 15:35:09 +0530 Subject: [PATCH] =?utf8?q?dmclock:=20error:=20=E2=80=98function=E2=80=99?= =?utf8?q?=20in=20namespace=20=E2=80=98std=E2=80=99=20does=20not=20name=20?= =?utf8?q?a=20template=20type?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The following error appears during make: In file included from ceph/src/dmclock/support/src/run_every.cc:10:0: ceph/src/dmclock/support/src/run_every.h:30:10: error: ‘function’ in namespace ‘std’ does not name a template type std::function body; ^~~~~~~~ ceph/src/dmclock/support/src/run_every.h:46:12: error: ‘std::function’ has not been declared std::function _body) : ^~~~~~~~ ceph/src/dmclock/support/src/run_every.h:46:20: error: expected ‘,’ or ‘...’ before ‘<’ token std::function _body) : ^ ceph/src/dmclock/support/src/run_every.h: In constructor ‘crimson::RunEvery::RunEvery(D, int)’: ceph/src/dmclock/support/src/run_every.h:48:7: error: class ‘crimson::RunEvery’ does not have any field named ‘body’ body(_body) ^~~~ ceph/src/dmclock/support/src/run_every.h:48:12: error: ‘_body’ was not declared in this scope body(_body) ^~~~~ ceph/src/dmclock/support/src/run_every.cc: In member function ‘void crimson::RunEvery::run()’: ceph/src/dmclock/support/src/run_every.cc:70:7: error: ‘body’ was not declared in this scope body(); ^~~~ ceph/src/dmclock/support/src/run_every.cc:70:7: note: suggested alternative: ‘bool’ body(); ^~~~ bool Signed-off-by: Jos Collin --- src/dmclock/support/src/run_every.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dmclock/support/src/run_every.h b/src/dmclock/support/src/run_every.h index c3499da91ef..58b85563e7e 100644 --- a/src/dmclock/support/src/run_every.h +++ b/src/dmclock/support/src/run_every.h @@ -11,7 +11,7 @@ #include #include #include - +#include namespace crimson { using std::chrono::duration_cast; -- 2.39.5