inlined type policy functions

This commit is contained in:
joaquintides
2022-10-27 13:36:14 +02:00
parent 4190720406
commit ac1de3c0af
2 changed files with 4 additions and 4 deletions

View File

@@ -46,12 +46,12 @@ namespace boost {
using value_type = std::pair<Key const, T>; using value_type = std::pair<Key const, T>;
template <class K, class V> template <class K, class V>
static raw_key_type const& extract(std::pair<K, V> const& kv) static inline raw_key_type const& extract(std::pair<K, V> const& kv)
{ {
return kv.first; 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 // TODO: we probably need to launder here
return {std::move(const_cast<raw_key_type&>(x.first)), return {std::move(const_cast<raw_key_type&>(x.first)),

View File

@@ -38,8 +38,8 @@ namespace boost {
using key_type = Key; using key_type = Key;
using init_type = Key; using init_type = Key;
using value_type = Key; using value_type = Key;
static Key const& extract(value_type const& key) { return key; } static inline Key const& extract(value_type const& key) { return key; }
static Key&& move(value_type& x) { return std::move(x); } static inline Key&& move(value_type& x) { return std::move(x); }
}; };
using table_type = detail::foa::table<set_types, Hash, KeyEqual, using table_type = detail::foa::table<set_types, Hash, KeyEqual,