diff --git a/src/node_crypto.h b/src/node_crypto.h index ee933ede1f83fb..06b76b42ff5cdf 100644 --- a/src/node_crypto.h +++ b/src/node_crypto.h @@ -75,15 +75,6 @@ struct MarkPopErrorOnReturn { ~MarkPopErrorOnReturn() { ERR_pop_to_mark(); } }; -template -struct FunctionDeleter { - void operator()(T* pointer) const { function(pointer); } - typedef std::unique_ptr Pointer; -}; - -template -using DeleteFnPtr = typename FunctionDeleter::Pointer; - // Define smart pointers for the most commonly used OpenSSL types: using X509Pointer = DeleteFnPtr; using BIOPointer = DeleteFnPtr; diff --git a/src/util.h b/src/util.h index 0e6fd5dd067c73..26654f15a1a626 100644 --- a/src/util.h +++ b/src/util.h @@ -456,6 +456,15 @@ struct is_callable::value >::type> : std::true_type { }; +template +struct FunctionDeleter { + void operator()(T* pointer) const { function(pointer); } + typedef std::unique_ptr Pointer; +}; + +template +using DeleteFnPtr = typename FunctionDeleter::Pointer; + } // namespace node #endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS