1 /* Copyright 2006-2011 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_INTERMODULE_HOLDER_HPP
10 #define BOOST_FLYWEIGHT_INTERMODULE_HOLDER_HPP
16 #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
17 #include <boost/flyweight/holder_tag.hpp>
18 #include <boost/flyweight/intermodule_holder_fwd.hpp>
19 #include <boost/interprocess/detail/intermodule_singleton.hpp>
20 #include <boost/mpl/aux_/lambda_support.hpp>
22 /* intermodule_holder_class guarantees a unique instance across all dynamic
23 * modules of a program.
31 struct intermodule_holder_class:
32 interprocess::ipcdetail::intermodule_singleton<C,true>,
35 typedef intermodule_holder_class type;
36 BOOST_MPL_AUX_LAMBDA_SUPPORT(1,intermodule_holder_class,(C))
39 /* intermodule_holder_class specifier */
41 struct intermodule_holder:holder_marker
46 typedef intermodule_holder_class<C> type;
50 } /* namespace flyweights */
52 } /* namespace boost */