Github user phrocker commented on a diff in the pull request: https://github.com/apache/nifi-minifi-cpp/pull/440#discussion_r234008240 --- Diff: libminifi/include/io/Serializable.h --- @@ -22,11 +22,36 @@ #include <string> #include "EndianCheck.h" #include "DataStream.h" + +namespace { + template<typename Integral, typename std::enable_if< --- End diff -- Far less readable and godbolt and my i7 showed no benefit to this. It seems like syntactical candy. Profiling shows no benefit whatsoever. Having functions with specific functors makes it easy on the development side to specifically type what we set. Your ticket "Type-unsafe template functions" I disagree. I think this is more type unsafe and less easy for developers to read. "Code duplication" I think this is true, but it results in perhaps some easier development for some. I think we should keep this as is and what was added is syntactical sugar with the potential negative that it can be more confusing during development.
---