From ac1de3c0afd0ac9536e291f7d93caef1eb602c94 Mon Sep 17 00:00:00 2001 From: joaquintides Date: Thu, 27 Oct 2022 13:36:14 +0200 Subject: [PATCH] inlined type policy functions --- include/boost/unordered/unordered_flat_map.hpp | 4 ++-- include/boost/unordered/unordered_flat_set.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/unordered/unordered_flat_map.hpp b/include/boost/unordered/unordered_flat_map.hpp index dd464eb2..4991b675 100644 --- a/include/boost/unordered/unordered_flat_map.hpp +++ b/include/boost/unordered/unordered_flat_map.hpp @@ -46,12 +46,12 @@ namespace boost { using value_type = std::pair; template - static raw_key_type const& extract(std::pair const& kv) + static inline raw_key_type const& extract(std::pair const& kv) { return kv.first; } - static moved_type move(value_type& x) + static inline moved_type move(value_type& x) { // TODO: we probably need to launder here return {std::move(const_cast(x.first)), diff --git a/include/boost/unordered/unordered_flat_set.hpp b/include/boost/unordered/unordered_flat_set.hpp index 1950dfb3..b3042ca9 100644 --- a/include/boost/unordered/unordered_flat_set.hpp +++ b/include/boost/unordered/unordered_flat_set.hpp @@ -38,8 +38,8 @@ namespace boost { using key_type = Key; using init_type = Key; using value_type = Key; - static Key const& extract(value_type const& key) { return key; } - static Key&& move(value_type& x) { return std::move(x); } + static inline Key const& extract(value_type const& key) { return key; } + static inline Key&& move(value_type& x) { return std::move(x); } }; using table_type = detail::foa::table