1 /* Copyright 2006-2009 Joaquin M Lopez Munoz.
2 * Distributed under the Boost Software License, Version 1.0.
3 * (See accompanying file LICENSE_1_0.txt or copy at
4 * http://www.boost.org/LICENSE_1_0.txt)
6 * See http://www.boost.org/libs/flyweight for library home page.
9 #ifndef BOOST_FLYWEIGHT_STATIC_HOLDER_HPP
10 #define BOOST_FLYWEIGHT_STATIC_HOLDER_HPP
16 #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
17 #include <boost/flyweight/static_holder_fwd.hpp>
18 #include <boost/flyweight/holder_tag.hpp>
19 #include <boost/mpl/aux_/lambda_support.hpp>
21 /* Simplest holder storing the T object as a local static variable.
29 struct static_holder_class:holder_marker
37 typedef static_holder_class type;
38 BOOST_MPL_AUX_LAMBDA_SUPPORT(1,static_holder_class,(C))
41 /* static_holder_class specifier */
43 struct static_holder:holder_marker
48 typedef static_holder_class<C> type;
52 } /* namespace flyweights */
54 } /* namespace boost */