From dc98019b5907cbae5fcfdb3df09fea17ec37d26a Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sun, 1 Jan 2017 00:53:46 +0000 Subject: [PATCH] easylogging++: fix logging with static const header only data members --- external/easylogging++/easylogging++.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/external/easylogging++/easylogging++.h b/external/easylogging++/easylogging++.h index dcf16a75..68864845 100644 --- a/external/easylogging++/easylogging++.h +++ b/external/easylogging++/easylogging++.h @@ -5092,7 +5092,19 @@ ELPP_LITERAL("(") << elem->first << ELPP_LITERAL(", ") << elem->second << ELPP_L } template - inline Writer& operator<<(const T& log) { + inline typename std::enable_if::value, Writer&>::type + operator<<(T log) { +#if ELPP_LOGGING_ENABLED + if (m_proceed) { + m_messageBuilder << log; + } +#endif // ELPP_LOGGING_ENABLED + return *this; + } + + template + inline typename std::enable_if::value, Writer&>::type + operator<<(const T& log) { #if ELPP_LOGGING_ENABLED if (m_proceed) { m_messageBuilder << log;