Back to Arangodb

Key-value flyweights reference

3rdParty/boost/1.78.0/libs/flyweight/doc/reference/key_value.html

3.12.9.12.4 KB
Original Source

Key-value flyweights reference


flyweight reference


Boost.Flyweight reference


Tags


Contents

Key extractors

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

  1. kfv(cv) is defined and have type const Key&,
  2. kfv(cv) is equivalent to kfv(Value(cv)),
  3. kfv(Value(k)) is equivalent to k,

for every kfv of type const KeyFromValue, cv of type const Value and k of type Key.

Header "boost/flyweight/key_value_fwd.hpp" synopsis

namespaceboost{namespaceflyweights{structno\_key\_from\_value;template\<typenameKey,typenameValue,typenameKeyFromValue=no\_key\_from\_value\>structkey\_value;}// namespace boost::flyweights}// namespace boost

Header "boost/flyweight/key_value.hpp" synopsis

Class template key_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.



flyweight reference


Boost.Flyweight reference


Tags

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)