diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-08-25 13:06:07 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-08-25 16:02:48 +0100 |
commit | 21a9cb6866afe3354bee60d852ebffc7ef3a8355 (patch) | |
tree | f897bdf6bf63971e24adeb2c7850252ce38fc345 /src/util.hpp | |
parent | 7301fe6484dc1b1d652425ad005ccfd214002a87 (diff) | |
download | webstat-21a9cb6866afe3354bee60d852ebffc7ef3a8355.tar.bz2 webstat-21a9cb6866afe3354bee60d852ebffc7ef3a8355.tar.xz webstat-21a9cb6866afe3354bee60d852ebffc7ef3a8355.zip |
Insert new entities and log entry in a transaction
If no new entities are required, no transaction is created.
Diffstat (limited to 'src/util.hpp')
-rw-r--r-- | src/util.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util.hpp b/src/util.hpp index 0ed260c..dcdc654 100644 --- a/src/util.hpp +++ b/src/util.hpp @@ -5,11 +5,11 @@ namespace WebStat { template<typename... T> auto - visitSum(auto && visitor, const std::tuple<T...> & values) + visit(auto && visitor, const std::tuple<T...> & values) { - return std::apply( + std::apply( [&](auto &&... value) { - return (visitor(value) + ...); + (visitor(value), ...); }, values); } |