adamdebreceni commented on a change in pull request #932:
URL: https://github.com/apache/nifi-minifi-cpp/pull/932#discussion_r514057657
##########
File path: libminifi/include/core/logging/Logger.h
##########
@@ -59,11 +59,18 @@ inline char const* conditional_conversion(const
utils::SmallString<N>& arr) {
return arr.c_str();
}
-template<typename T>
+template<typename T, typename = typename std::enable_if<
+ std::is_arithmetic<T>::value ||
+ std::is_enum<T>::value ||
+ std::is_pointer<T>::value>::type>
inline T conditional_conversion(T const& t) {
return t;
}
+inline char const* conditional_conversion(const char* str) {
+ return str;
+}
Review comment:
for some reason I cannot reply to your comment about `std::hash`
specialization:
from [google
guidelines](https://google.github.io/styleguide/cppguide.html#std_hash)
> Do not define specializations of std::hash.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]