1 /* Copyright 2003-2007 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_MODIFY_KEY_ADAPTOR_HPP
10 #define BOOST_MULTI_INDEX_DETAIL_MODIFY_KEY_ADAPTOR_HPP
12 #if defined(_MSC_VER)&&(_MSC_VER>=1200)
18 namespace multi_index{
22 /* Functional adaptor to resolve modify_key as a call to modify.
23 * Preferred over compose_f_gx and stuff cause it eliminates problems
24 * with references to references, dealing with function pointers, etc.
27 template<typename Fun,typename Value,typename KeyFromValue>
28 struct modify_key_adaptor
31 modify_key_adaptor(Fun f_,KeyFromValue kfv_):f(f_),kfv(kfv_){}
33 void operator()(Value& x)
43 } /* namespace multi_index::detail */
45 } /* namespace multi_index */
47 } /* namespace boost */