summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2025-09-05 00:02:08 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2025-09-05 00:02:08 +0100
commit944f788a33e5c65e5ac1013500f78c0658401464 (patch)
treee6810ed049a45698f91ea0dac86dc6df59b0d1ec
parentfdab57f966a3928852701a2e41d75499f8f828ac (diff)
downloadwebstat-944f788a33e5c65e5ac1013500f78c0658401464.tar.bz2
webstat-944f788a33e5c65e5ac1013500f78c0658401464.tar.xz
webstat-944f788a33e5c65e5ac1013500f78c0658401464.zip
Replace DeleteWith lambda with a normal type
Lambdas have internal linkage.
-rw-r--r--src/util.hpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/util.hpp b/src/util.hpp
index 4965ae7..d712d3b 100644
--- a/src/util.hpp
+++ b/src/util.hpp
@@ -4,10 +4,13 @@
#include <tuple>
namespace WebStat {
- template<auto Deleter>
- using DeleteWith = decltype([](auto obj) {
- return Deleter(obj);
- });
+ template<auto Deleter> struct DeleteWith {
+ auto
+ operator()(auto obj)
+ {
+ return Deleter(obj);
+ }
+ };
template<typename... T>
auto