easylogging++: fix logging with static const header only data members

This commit is contained in:
moneromooo-monero 2017-03-25 20:16:44 +00:00
parent 72663f4b83
commit 2c8b23e331
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 13 additions and 1 deletions

View File

@ -3256,7 +3256,19 @@ class Writer : base::NoCopy {
}
template <typename T>
inline Writer& operator<<(const T& log) {
inline typename std::enable_if<std::is_integral<T>::value, Writer&>::type
operator<<(T log) {
#if ELPP_LOGGING_ENABLED
if (m_proceed) {
m_messageBuilder << log;
}
#endif // ELPP_LOGGING_ENABLED
return *this;
}
template <typename T>
inline typename std::enable_if<!std::is_integral<T>::value, Writer&>::type
operator<<(const T& log) {
#if ELPP_LOGGING_ENABLED
if (m_proceed) {
m_messageBuilder << log;