Key-value flyweights reference"boost/flyweight/key_value_fwd.hpp" synopsis
"boost/flyweight/key_value.hpp" synopsis
Let Key be a type with some implicit equivalence relationship
and Value a type constructible from Key.
A Default
Constructible type KeyFromValue is said
to be a key extractor from Value to Key if
kfv(cv) is defined and have type const Key&,kfv(cv) is equivalent to kfv(Value(cv)),kfv(Value(k)) is equivalent to k,kfv of type const KeyFromValue,
cv of type const Value and
k of type Key.
"boost/flyweight/key_value_fwd.hpp" synopsisnamespace boost{ namespace flyweights{ struct no_key_from_value; template< typename Key,typename Value, typename KeyFromValue=no_key_from_value > struct key_value; } // namespace boost::flyweights } // namespace boost
"boost/flyweight/key_value.hpp" synopsiskey_value
In flyweight instantiations
of the form flyweight<T,...>, the associated
key_type and value_type are both equal to T.
Instantiations of the form flyweight<key_value<Key,Value[,KeyFromValue]>,...>
allow to specify these types separately. Key and Value
must be different types. When provided, KeyFromValue
must be a Key Extractor from
Value to Key.
Revised April 24th 2019
© Copyright 2006-2019 Joaquín M López Muñoz. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)