fix doc example typo
[boost.git] / boost / multi_index_container_fwd.hpp
blob99e8db36cf259784fc7e541fd5713c2005630541
1 /* Copyright 2003-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)
6 * See http://www.boost.org/libs/multi_index for library home page.
7 */
9 #ifndef BOOST_MULTI_INDEX_FWD_HPP
10 #define BOOST_MULTI_INDEX_FWD_HPP
12 #if defined(_MSC_VER)&&(_MSC_VER>=1200)
13 #pragma once
14 #endif
16 #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
17 #include <boost/multi_index/identity.hpp>
18 #include <boost/multi_index/indexed_by.hpp>
19 #include <boost/multi_index/ordered_index_fwd.hpp>
20 #include <memory>
22 namespace boost{
24 namespace multi_index{
26 /* Default value for IndexSpecifierList specifies a container
27 * equivalent to std::set<Value>.
30 template<
31 typename Value,
32 typename IndexSpecifierList=indexed_by<ordered_unique<identity<Value> > >,
33 typename Allocator=std::allocator<Value> >
34 class multi_index_container;
36 template<typename MultiIndexContainer,int N>
37 struct nth_index;
39 template<typename MultiIndexContainer,typename Tag>
40 struct index;
42 template<typename MultiIndexContainer,int N>
43 struct nth_index_iterator;
45 template<typename MultiIndexContainer,int N>
46 struct nth_index_const_iterator;
48 template<typename MultiIndexContainer,typename Tag>
49 struct index_iterator;
51 template<typename MultiIndexContainer,typename Tag>
52 struct index_const_iterator;
54 /* get and project functions not fwd declared due to problems
55 * with dependent typenames
58 template<
59 typename Value1,typename IndexSpecifierList1,typename Allocator1,
60 typename Value2,typename IndexSpecifierList2,typename Allocator2
62 bool operator==(
63 const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x,
64 const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y);
66 template<
67 typename Value1,typename IndexSpecifierList1,typename Allocator1,
68 typename Value2,typename IndexSpecifierList2,typename Allocator2
70 bool operator<(
71 const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x,
72 const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y);
74 template<
75 typename Value1,typename IndexSpecifierList1,typename Allocator1,
76 typename Value2,typename IndexSpecifierList2,typename Allocator2
78 bool operator!=(
79 const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x,
80 const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y);
82 template<
83 typename Value1,typename IndexSpecifierList1,typename Allocator1,
84 typename Value2,typename IndexSpecifierList2,typename Allocator2
86 bool operator>(
87 const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x,
88 const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y);
90 template<
91 typename Value1,typename IndexSpecifierList1,typename Allocator1,
92 typename Value2,typename IndexSpecifierList2,typename Allocator2
94 bool operator>=(
95 const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x,
96 const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y);
98 template<
99 typename Value1,typename IndexSpecifierList1,typename Allocator1,
100 typename Value2,typename IndexSpecifierList2,typename Allocator2
102 bool operator<=(
103 const multi_index_container<Value1,IndexSpecifierList1,Allocator1>& x,
104 const multi_index_container<Value2,IndexSpecifierList2,Allocator2>& y);
106 template<typename Value,typename IndexSpecifierList,typename Allocator>
107 void swap(
108 multi_index_container<Value,IndexSpecifierList,Allocator>& x,
109 multi_index_container<Value,IndexSpecifierList,Allocator>& y);
111 } /* namespace multi_index */
113 /* multi_index_container, being the main type of this library, is promoted to
114 * namespace boost.
117 using multi_index::multi_index_container;
119 } /* namespace boost */
121 #endif