From e4d2da40f2f2f6d3632840d0a01293e5ec86a39e Mon Sep 17 00:00:00 2001 From: Christian Mazakas Date: Thu, 6 Apr 2023 09:36:08 -0700 Subject: [PATCH] Add missing static_assert()s --- include/boost/unordered/concurrent_flat_map.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/boost/unordered/concurrent_flat_map.hpp b/include/boost/unordered/concurrent_flat_map.hpp index bca9f61f..fd941175 100644 --- a/include/boost/unordered/concurrent_flat_map.hpp +++ b/include/boost/unordered/concurrent_flat_map.hpp @@ -278,12 +278,14 @@ namespace boost { template bool emplace_or_visit(F f, Args&&... args) { + BOOST_UNORDERED_STATIC_ASSERT_INVOCABLE(F) return table_.emplace_or_visit(f, std::forward(args)...); } template bool emplace_or_cvisit(F f, Args&&... args) { + BOOST_UNORDERED_STATIC_ASSERT_CONST_INVOCABLE(F) return table_.emplace_or_cvisit(f, std::forward(args)...); } @@ -310,18 +312,21 @@ namespace boost { template bool try_emplace_or_visit(key_type const& k, F f, Args&&... args) { + BOOST_UNORDERED_STATIC_ASSERT_INVOCABLE(F) return table_.try_emplace_or_visit(k, f, std::forward(args)...); } template bool try_emplace_or_cvisit(key_type const& k, F f, Args&&... args) { + BOOST_UNORDERED_STATIC_ASSERT_CONST_INVOCABLE(F) return table_.try_emplace_or_cvisit(k, f, std::forward(args)...); } template bool try_emplace_or_visit(key_type&& k, F f, Args&&... args) { + BOOST_UNORDERED_STATIC_ASSERT_INVOCABLE(F) return table_.try_emplace_or_visit( std::move(k), f, std::forward(args)...); } @@ -329,6 +334,7 @@ namespace boost { template bool try_emplace_or_cvisit(key_type&& k, F f, Args&&... args) { + BOOST_UNORDERED_STATIC_ASSERT_CONST_INVOCABLE(F) return table_.try_emplace_or_cvisit( std::move(k), f, std::forward(args)...); } @@ -336,6 +342,7 @@ namespace boost { template bool try_emplace_or_visit(K&& k, F f, Args&&... args) { + BOOST_UNORDERED_STATIC_ASSERT_INVOCABLE(F) return table_.try_emplace_or_visit( std::forward(k), f, std::forward(args)...); } @@ -343,6 +350,7 @@ namespace boost { template bool try_emplace_or_cvisit(K&& k, F f, Args&&... args) { + BOOST_UNORDERED_STATIC_ASSERT_CONST_INVOCABLE(F) return table_.try_emplace_or_cvisit( std::forward(k), f, std::forward(args)...); }