Warning, file /include/boost/flyweight/static_holder.hpp was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef BOOST_FLYWEIGHT_STATIC_HOLDER_HPP
0010 #define BOOST_FLYWEIGHT_STATIC_HOLDER_HPP
0011
0012 #if defined(_MSC_VER)
0013 #pragma once
0014 #endif
0015
0016 #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
0017 #include <boost/flyweight/static_holder_fwd.hpp>
0018 #include <boost/flyweight/holder_tag.hpp>
0019 #include <boost/mpl/aux_/lambda_support.hpp>
0020
0021
0022
0023
0024 namespace boost{
0025
0026 namespace flyweights{
0027
0028 template<typename C>
0029 struct static_holder_class:holder_marker
0030 {
0031 static C& get()
0032 {
0033 static C c;
0034 return c;
0035 }
0036
0037 typedef static_holder_class type;
0038 BOOST_MPL_AUX_LAMBDA_SUPPORT(1,static_holder_class,(C))
0039 };
0040
0041
0042
0043 struct static_holder:holder_marker
0044 {
0045 template<typename C>
0046 struct apply
0047 {
0048 typedef static_holder_class<C> type;
0049 };
0050 };
0051
0052 }
0053
0054 }
0055
0056 #endif