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_CONVERTER_HPP
10 #define BOOST_MULTI_INDEX_DETAIL_CONVERTER_HPP
12 #if defined(_MSC_VER)&&(_MSC_VER>=1200)
18 namespace multi_index{
22 /* converter offers means to access indices of a given multi_index_container
23 * and for convertibilty between index iterators, so providing a
24 * localized access point for get() and project() functions.
27 template<typename MultiIndexContainer,typename Index>
30 static const Index& index(const MultiIndexContainer& x){return x;}
31 static Index& index(MultiIndexContainer& x){return x;}
33 static typename Index::const_iterator const_iterator(
34 const MultiIndexContainer& x,typename MultiIndexContainer::node_type* node)
36 return x.Index::make_iterator(node);
39 static typename Index::iterator iterator(
40 MultiIndexContainer& x,typename MultiIndexContainer::node_type* node)
42 return x.Index::make_iterator(node);
46 } /* namespace multi_index::detail */
48 } /* namespace multi_index */
50 } /* namespace boost */