Hi,
Clang is complaining about this piece of code:
#define dout_impl(cct, sub, v) \
do { \
const bool should_gather = [&](const auto cctX) { \
if constexpr (ceph::dout::is_dynamic<decltype(sub)>::value || \
ceph::dout::is_dynamic<decltype(v)>::value) { \
return cctX->_conf->subsys.should_gather(sub, v); \
} else { \
/* The parentheses are **essential** because commas in angle \
* brackets are NOT ignored on macro expansion! A language's \
* limitation, sorry. */ \
return (cctX->_conf->subsys.template should_gather<sub, v>()); \
} \
}(cct); \
But I'm having a hard time fixing it.
Suggestions are welcome.
Thanx,
--WjW
/home/wjw/wip/src/tools/rbd_ggate/debug.cc:20:5: error: no matching
member function for call to 'should_gather'
dout(level) << msg << dendl;
^~~~~~~~~~~
/home/wjw/wip/src/common/debug.h:23:17: note: expanded from macro 'dout'
#define dout(v) ldout((dout_context), v)
^~~~~~~~~~~~~~~~~~~~~~~~
/home/wjw/wip/src/common/dout.h:96:24: note: expanded from macro 'ldout'
#define ldout(cct, v) dout_impl(cct, dout_subsys, v) dout_prefix
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/wjw/wip/src/common/dout.h:81:44: note: expanded from macro 'dout_impl'
return (cctX->_conf->subsys.template should_gather<sub, v>()); \
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
/home/wjw/wip/src/tools/rbd_ggate/debug.cc:20:5: note: in instantiation
of function template specialization 'debugv(int, const char *,
__va_list_tag *)::(anonymous class)::operator()<CephContext *>'
requested here
/home/wjw/wip/src/common/debug.h:23:17: note: expanded from macro 'dout'
#define dout(v) ldout((dout_context), v)
^
/home/wjw/wip/src/common/dout.h:96:24: note: expanded from macro 'ldout'
#define ldout(cct, v) dout_impl(cct, dout_subsys, v) dout_prefix
^
/home/wjw/wip/src/common/dout.h:83:4: note: expanded from macro 'dout_impl'
}(cct); \
^
/home/wjw/wip/src/log/SubsystemMap.h:72:8: note: candidate template
ignored: invalid explicitly-specified argument for template parameter 'LvlV'
bool should_gather() {
^
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html