]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
dmclock: error: ‘function’ in namespace ‘std’ does not name a template type 14909/head
authorJos Collin <jcollin@redhat.com>
Tue, 2 May 2017 10:05:09 +0000 (15:35 +0530)
committerJos Collin <jcollin@redhat.com>
Tue, 2 May 2017 10:05:14 +0000 (15:35 +0530)
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<void()>     body;
          ^~~~~~~~
ceph/src/dmclock/support/src/run_every.h:46:12: error: ‘std::function’ has not been declared
       std::function<void()> _body) :
            ^~~~~~~~
ceph/src/dmclock/support/src/run_every.h:46:20: error: expected ‘,’ or ‘...’ before ‘<’ token
       std::function<void()> _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 <jcollin@redhat.com>
src/dmclock/support/src/run_every.h

index c3499da91efc632be9f6e8f761b28323911494c7..58b85563e7eb0a4a3753987a450b04ee9b7fd527 100644 (file)
@@ -11,7 +11,7 @@
 #include <mutex>
 #include <condition_variable>
 #include <thread>
-
+#include <functional>
 
 namespace crimson {
   using std::chrono::duration_cast;