Imported Upstream version 1.57.0
[platform/upstream/boost.git] / boost / flyweight / no_tracking.hpp
1 /* Copyright 2006-2008 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)
5  *
6  * See http://www.boost.org/libs/flyweight for library home page.
7  */
8
9 #ifndef BOOST_FLYWEIGHT_NO_TRACKING_HPP
10 #define BOOST_FLYWEIGHT_NO_TRACKING_HPP
11
12 #if defined(_MSC_VER)
13 #pragma once
14 #endif
15
16 #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
17 #include <boost/flyweight/no_tracking_fwd.hpp>
18 #include <boost/flyweight/tracking_tag.hpp>
19
20 /* Null tracking policy: elements are never erased from the factory.
21  */
22
23 namespace boost{
24
25 namespace flyweights{
26
27 struct no_tracking:tracking_marker
28 {
29   struct entry_type
30   {
31     template<typename Value,typename Key>
32     struct apply{typedef Value type;};
33   };
34
35   struct handle_type
36   {
37     template<typename Handle,typename TrackingHelper>
38     struct apply{typedef Handle type;};
39   };
40 };
41
42 } /* namespace flyweights */
43
44 } /* namespace boost */
45
46 #endif