]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/signals2/include/boost/signals2/detail/replace_slot_function.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / signals2 / include / boost / signals2 / detail / replace_slot_function.hpp
1 // Copyright Frank Mori Hess 2007-2009
2 //
3 // Use, modification and
4 // distribution is subject to the Boost Software License, Version
5 // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt)
7
8 // For more information, see http://www.boost.org
9
10 #ifndef BOOST_SIGNALS2_DETAIL_REPLACE_SLOT_FUNCTION_HPP
11 #define BOOST_SIGNALS2_DETAIL_REPLACE_SLOT_FUNCTION_HPP
12
13 #include <boost/signals2/slot_base.hpp>
14
15 namespace boost
16 {
17 namespace signals2
18 {
19 namespace detail
20 {
21 template<typename ResultSlot, typename SlotIn, typename SlotFunction>
22 ResultSlot replace_slot_function(const SlotIn &slot_in, const SlotFunction &fun)
23 {
24 ResultSlot slot(fun);
25 slot.track(slot_in);
26 return slot;
27 }
28 } // namespace detail
29 } // namespace signals2
30 } // namespace boost
31
32 #endif // BOOST_SIGNALS2_DETAIL_REPLACE_SLOT_FUNCTION_HPP