dout: Remove VLA sanity check

This doesn't seem to be able to work for C++17 under both GCC and
Clang. Maybe there's a better way to do it. I might try routing
that argument through a constexpr function in the macro later.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
This commit is contained in:
Adam C. Emerson 2017-12-22 18:44:57 -05:00
parent 22d52655c3
commit 6580d0a6d9

View File

@ -49,9 +49,6 @@ public:
#define dout_impl(cct, sub, v) \
do { \
if (cct->_conf->subsys.should_gather(sub, v)) { \
if (0) { \
[[maybe_unused]] char __array[((v >= -1) && (v <= 200)) ? 0 : -1] = {}; \
} \
static size_t _log_exp_length = 80; \
ceph::logging::Entry *_dout_e = cct->_log->create_entry(v, sub, &_log_exp_length); \
static_assert(std::is_convertible<decltype(&*cct), \