Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
1 /* Copyright 2003-2005 Joaquín M López Muñoz.
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/multi_index for library home page.
9 #ifndef BOOST_MULTI_INDEX_DETAIL_HEADER_HOLDER_HPP
10 #define BOOST_MULTI_INDEX_DETAIL_HEADER_HOLDER_HPP
12 #if defined(_MSC_VER)&&(_MSC_VER>=1200)
16 #include <boost/noncopyable.hpp>
20 namespace multi_index{
24 /* A utility class used to hold a pointer to the header node.
25 * The base from member idiom is used because index classes, which are
26 * superclasses of multi_index_container, need this header in construction
27 * time. The allocation is made by the allocator of the multi_index_container
28 * class --hence, this allocator needs also be stored resorting
29 * to the base from member trick.
32 template<typename NodeType,typename Final>
33 struct header_holder:private noncopyable
35 header_holder():member(final().allocate_node()){}
36 ~header_holder(){final().deallocate_node(member);}
41 Final& final(){return *static_cast<Final*>(this);}
44 } /* namespace multi_index::detail */
46 } /* namespace multi_index */
48 } /* namespace boost */