3rdParty/boost/1.78.0/libs/flyweight/doc/reference/holders.html
Given a type C, a type Holder is said to be a holder of C if the expression Holder::get() returns a reference to a default initialized C object unique to Holder. No invocation of Holder::get(), except possibly the first one in the program, does throw. flyweight privately uses a holder to instantiate a factory and some additional data (like a mutex for internal synchronization) unique to each instantiation type of the class template.
A type S is a holder specifier if:
One of the following conditions is satisfied:
S is of the form holder<S'>.
S, or S' if (b) applies, is an MPL Lambda Expression such that invoking it with type C resolves to a holder of C.
"boost/flyweight/holder_tag.hpp" synopsisnamespaceboost{namespaceflyweights{structholder\_marker;template\<typenameT\>structis\_holder;template\<typenameT\>structholder;}// namespace boost::flyweights}// namespace boost
is_holderUnless specialized by the user, is_holder<T>::type is boost::mpl::true_ if T is derived from holder_marker, and it is boost::mpl::false_ otherwise.
holderholder<T> is a syntactic construct meant to indicate that T is a holder specifier without resorting to the mechanisms provided by the is_holder class template.
"boost/flyweight/static_holder_fwd.hpp" synopsisnamespaceboost{namespaceflyweights{template\<typenameC\>structstatic\_holder\_class;structstatic\_holder;}// namespace boost::flyweights}// namespace boost
static_holder_fwd.hpp forward declares static_holder_class and static_holder.
"boost/flyweight/static_holder.hpp" synopsisstatic_holder_classstatic_holder_class<C> keeps its unique instance of C as a local static object.
static_holderHolder Specifier for static_holder_class.
"boost/flyweight/intermodule_holder_fwd.hpp" synopsisnamespaceboost{namespaceflyweights{template\<typenameC\>structintermodule\_holder\_class;structintermodule\_holder;}// namespace boost::flyweights}// namespace boost
intermodule_holder_fwd.hpp forward declares intermodule_holder_class and intermodule_holder.
"boost/flyweight/intermodule_holder.hpp" synopsisintermodule_holder_classintermodule_holder_class<C> maintains a C instance which is unique even across different dynamically linked modules of the program using this same type. In general, this guarantee is not provided by static_holder_class, as most C++ implementations are not able to merge duplicates of static variables stored in different dynamic modules of a program.
intermodule_holderHolder Specifier for intermodule_holder_class.
Revised August 11th 2008
© Copyright 2006-2008 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)