File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -75,15 +75,6 @@ struct MarkPopErrorOnReturn {
75
75
~MarkPopErrorOnReturn () { ERR_pop_to_mark (); }
76
76
};
77
77
78
- template <typename T, void (*function)(T*)>
79
- struct FunctionDeleter {
80
- void operator ()(T* pointer) const { function (pointer); }
81
- typedef std::unique_ptr<T, FunctionDeleter> Pointer;
82
- };
83
-
84
- template <typename T, void (*function)(T*)>
85
- using DeleteFnPtr = typename FunctionDeleter<T, function>::Pointer;
86
-
87
78
// Define smart pointers for the most commonly used OpenSSL types:
88
79
using X509Pointer = DeleteFnPtr<X509, X509_free>;
89
80
using BIOPointer = DeleteFnPtr<BIO, BIO_free_all>;
Original file line number Diff line number Diff line change @@ -456,6 +456,15 @@ struct is_callable<T, typename std::enable_if<
456
456
std::is_same<decltype (void (&T::operator ())), void>::value
457
457
>::type> : std::true_type { };
458
458
459
+ template <typename T, void (*function)(T*)>
460
+ struct FunctionDeleter {
461
+ void operator ()(T* pointer) const { function (pointer); }
462
+ typedef std::unique_ptr<T, FunctionDeleter> Pointer;
463
+ };
464
+
465
+ template <typename T, void (*function)(T*)>
466
+ using DeleteFnPtr = typename FunctionDeleter<T, function>::Pointer;
467
+
459
468
} // namespace node
460
469
461
470
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS
You can’t perform that action at this time.
0 commit comments