From: Willem Jan Withagen Date: Fri, 14 Jul 2017 08:44:44 +0000 (+0200) Subject: core:" Stringify needs access to << before reference" src/include/stringify.h X-Git-Tag: v12.1.1~17^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7f1d884944419a9fdc9b89f7be9c8ea149197113;p=ceph.git core:" Stringify needs access to << before reference" src/include/stringify.h Clang complains: In file included from /home/jenkins/workspace/ceph-master/src/mon/HealthMonitor.cc:21: /home/jenkins/workspace/ceph-master/src/include/stringify.h:15:6: error: call to function 'operator<<' that is neither visible in the template definition nor found by argument-dependent lookup ss << a; ^ /home/jenkins/workspace/ceph-master/src/mon/HealthMonitor.cc:129:32: note: in instantiation of function template specialization 'stringify, std::__1::less >, std::__1::allocator > > >' requested here boost::regex("%names%"), stringify(names[p.first])); ^ /home/jenkins/workspace/ceph-master/src/include/types.h:160:17: note: 'operator<<' should be declared prior to the call site inline ostream& operator<<(ostream& out, const set& iset) { Signed-off-by: Willem Jan Withagen --- diff --git a/src/include/stringify.h b/src/include/stringify.h index d7b90ed2c909..1b2a130c9301 100644 --- a/src/include/stringify.h +++ b/src/include/stringify.h @@ -4,6 +4,8 @@ #include #include +#include "include/types.h" + template inline std::string stringify(const T& a) { #if defined(__GNUC__) && !(defined(__clang__) || defined(__INTEL_COMPILER))