summaryrefslogtreecommitdiffstats
path: root/src/libutil/cxx
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2023-08-18 13:15:20 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2023-08-18 13:15:20 +0100
commiteb6f412f8f2002b16f25dadf0464b4cde5797d7d (patch)
tree2372e7f6722864bb3701aaf4fffdff2a3072de97 /src/libutil/cxx
parentdbaf8c69895ec2a90a20dbf41b4fa474ac12910b (diff)
downloadrspamd-eb6f412f8f2002b16f25dadf0464b4cde5797d7d.tar.gz
rspamd-eb6f412f8f2002b16f25dadf0464b4cde5797d7d.zip
[Minor] Allow rspamd_lua_require_function to work without function
Diffstat (limited to 'src/libutil/cxx')
-rw-r--r--src/libutil/cxx/hash_util.hxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libutil/cxx/hash_util.hxx b/src/libutil/cxx/hash_util.hxx
index 972165850..05f3d97ae 100644
--- a/src/libutil/cxx/hash_util.hxx
+++ b/src/libutil/cxx/hash_util.hxx
@@ -1,11 +1,11 @@
-/*-
- * Copyright 2021 Vsevolod Stakhov
+/*
+ * Copyright 2023 Vsevolod Stakhov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -59,6 +59,7 @@ struct smart_ptr_equal {
template<typename T>
struct smart_ptr_hash {
using is_transparent = void; /* We want to find values in a set of shared_ptr by reference */
+ using is_avalanching = void;
auto operator()(const std::shared_ptr<T> &a) const
{
return std::hash<T>()(*a);
@@ -92,7 +93,7 @@ struct smart_str_equal {
struct smart_str_hash {
using is_transparent = void;
- using is_avalanching = typename ankerl::unordered_dense::hash<std::string_view>::is_avalanching;
+ using is_avalanching = void;
auto operator()(const std::string &a) const
{
return ankerl::unordered_dense::hash<std::string>()(a);