mirror of
https://github.com/boostorg/unordered.git
synced 2025-07-31 03:47:16 +02:00
inlined type policy functions
This commit is contained in:
@ -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)),
|
||||||
|
@ -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,
|
||||||
|
Reference in New Issue
Block a user