comparison DEPENDENCIES/generic/include/boost/multi_index/mem_fun.hpp @ 101:c530137014c0

Update Boost headers (1.58.0)
author Chris Cannam
date Mon, 07 Sep 2015 11:12:49 +0100
parents 2665513ce2d3
children
comparison
equal deleted inserted replaced
100:793467b5e61c 101:c530137014c0
1 /* Copyright 2003-2008 Joaquin M Lopez Munoz. 1 /* Copyright 2003-2013 Joaquin M Lopez Munoz.
2 * Distributed under the Boost Software License, Version 1.0. 2 * Distributed under the Boost Software License, Version 1.0.
3 * (See accompanying file LICENSE_1_0.txt or copy at 3 * (See accompanying file LICENSE_1_0.txt or copy at
4 * http://www.boost.org/LICENSE_1_0.txt) 4 * http://www.boost.org/LICENSE_1_0.txt)
5 * 5 *
6 * See http://www.boost.org/libs/multi_index for library home page. 6 * See http://www.boost.org/libs/multi_index for library home page.
7 */ 7 */
8 8
9 #ifndef BOOST_MULTI_INDEX_MEM_FUN_HPP 9 #ifndef BOOST_MULTI_INDEX_MEM_FUN_HPP
10 #define BOOST_MULTI_INDEX_MEM_FUN_HPP 10 #define BOOST_MULTI_INDEX_MEM_FUN_HPP
11 11
12 #if defined(_MSC_VER)&&(_MSC_VER>=1200) 12 #if defined(_MSC_VER)
13 #pragma once 13 #pragma once
14 #endif 14 #endif
15 15
16 #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */ 16 #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
17 #include <boost/mpl/if.hpp> 17 #include <boost/mpl/if.hpp>
110 * specifies the signature of the member function. The workaround was found at: 110 * specifies the signature of the member function. The workaround was found at:
111 * Daniel, C.:"Re: weird typedef problem in VC", 111 * Daniel, C.:"Re: weird typedef problem in VC",
112 * news:microsoft.public.vc.language, 21st nov 2002, 112 * news:microsoft.public.vc.language, 21st nov 2002,
113 * http://groups.google.com/groups? 113 * http://groups.google.com/groups?
114 * hl=en&lr=&ie=UTF-8&selm=ukwvg3O0BHA.1512%40tkmsftngp05 114 * hl=en&lr=&ie=UTF-8&selm=ukwvg3O0BHA.1512%40tkmsftngp05
115 *
116 * MSVC++ 6.0 support has been dropped and [const_]mem_fun_explicit is
117 * deprecated.
115 */ 118 */
116 119
117 template< 120 template<
118 class Class,typename Type, 121 class Class,typename Type,
119 typename PtrToMemberFunctionType,PtrToMemberFunctionType PtrToMemberFunction> 122 typename PtrToMemberFunctionType,PtrToMemberFunctionType PtrToMemberFunction>
181 { 184 {
182 return operator()(x.get()); 185 return operator()(x.get());
183 } 186 }
184 }; 187 };
185 188
186 /* BOOST_MULTI_INDEX_CONST_MEM_FUN and BOOST_MULTI_INDEX_MEM_FUN resolve to 189 /* BOOST_MULTI_INDEX_CONST_MEM_FUN and BOOST_MULTI_INDEX_MEM_FUN used to
187 * [const_]mem_fun_explicit for MSVC++ 6.0 and to [const_]mem_fun otherwise. 190 * resolve to [const_]mem_fun_explicit for MSVC++ 6.0 and to
188 */ 191 * [const_]mem_fun otherwise. Support for this compiler having been dropped,
189 192 * they are now just wrappers over [const_]mem_fun kept for backwards-
190 #if defined(BOOST_MSVC)&&(BOOST_MSVC<1300) 193 * compatibility reasons.
191 194 */
192 #define BOOST_MULTI_INDEX_CONST_MEM_FUN(Class,Type,MemberFunName) \
193 ::boost::multi_index::const_mem_fun_explicit<\
194 Class,Type,Type (Class::*)()const,&Class::MemberFunName >
195 #define BOOST_MULTI_INDEX_MEM_FUN(Class,Type,MemberFunName) \
196 ::boost::multi_index::mem_fun_explicit<\
197 Class,Type,Type (Class::*)(),&Class::MemberFunName >
198
199 #else
200 195
201 #define BOOST_MULTI_INDEX_CONST_MEM_FUN(Class,Type,MemberFunName) \ 196 #define BOOST_MULTI_INDEX_CONST_MEM_FUN(Class,Type,MemberFunName) \
202 ::boost::multi_index::const_mem_fun< Class,Type,&Class::MemberFunName > 197 ::boost::multi_index::const_mem_fun< Class,Type,&Class::MemberFunName >
203 #define BOOST_MULTI_INDEX_MEM_FUN(Class,Type,MemberFunName) \ 198 #define BOOST_MULTI_INDEX_MEM_FUN(Class,Type,MemberFunName) \
204 ::boost::multi_index::mem_fun< Class,Type,&Class::MemberFunName > 199 ::boost::multi_index::mem_fun< Class,Type,&Class::MemberFunName >
205 200
206 #endif
207
208 } /* namespace multi_index */ 201 } /* namespace multi_index */
209 202
210 } /* namespace boost */ 203 } /* namespace boost */
211 204
212 #endif 205 #endif