From b7d3b265af36ea309483678aa57e0cd30026aa29 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 8 Oct 2023 16:21:00 +0100 Subject: Make pq_deleter a generic helper --- libpqpp/pq-helpers.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 libpqpp/pq-helpers.h (limited to 'libpqpp/pq-helpers.h') diff --git a/libpqpp/pq-helpers.h b/libpqpp/pq-helpers.h new file mode 100644 index 0000000..76e5057 --- /dev/null +++ b/libpqpp/pq-helpers.h @@ -0,0 +1,14 @@ +#ifndef PQ_HELPERS_H +#define PQ_HELPERS_H + +namespace PQ { + template struct pq_deleter { + void + operator()(auto p) const + { + func(p); + } + }; +} + +#endif -- cgit v1.2.3