From: Jos Collin Date: Tue, 2 May 2017 10:05:09 +0000 (+0530) Subject: dmclock: error: ‘function’ in namespace ‘std’ does not name a template type X-Git-Tag: v12.0.3~118^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=902561e9c35d4679f85217c2ff23cc81604a4b0b;p=ceph.git dmclock: error: ‘function’ in namespace ‘std’ does not name a template type 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 --- diff --git a/src/dmclock/support/src/run_every.h b/src/dmclock/support/src/run_every.h index c3499da91efc..58b85563e7eb 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;