adamdebreceni commented on a change in pull request #1044:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1044#discussion_r630100150



##########
File path: libminifi/include/utils/GeneralUtils.h
##########
@@ -174,6 +174,21 @@ auto invoke(F&& f, Args&&... args) 
MINIFICPP_UTIL_DEDUCED(detail::invoke_impl(st
 using std::invoke
 #endif /* < C++17 */
 
+#if __cplusplus < 201703L
+#define CPP17_INLINE
+#else
+#define CPP17_INLINE inline
+#endif /* < C++17 */
+
+namespace detail {
+struct dereference_t {
+  template<typename T>
+  T &operator()(T *ptr) const noexcept { return *ptr; }
+};
+}  // namespace detail
+
+CPP17_INLINE constexpr detail::dereference_t dereference{};

Review comment:
       why do we need the `inline`, don't const variables have internal linkage?




-- 
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:
us...@infra.apache.org


Reply via email to