]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/geometry/include/boost/geometry/index/detail/utilities.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / geometry / include / boost / geometry / index / detail / utilities.hpp
1 // Boost.Geometry Index
2 //
3 // Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
4 //
5 // Use, modification and distribution is subject to the Boost Software License,
6 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
8
9 #include <boost/swap.hpp>
10 //#include <boost/type_traits/is_empty.hpp>
11
12 #ifndef BOOST_GEOMETRY_INDEX_DETAIL_UTILITIES_HPP
13 #define BOOST_GEOMETRY_INDEX_DETAIL_UTILITIES_HPP
14
15 namespace boost { namespace geometry { namespace index { namespace detail {
16
17 template<class T>
18 static inline void assign_cond(T & l, T const& r, boost::mpl::bool_<true> const&)
19 {
20 l = r;
21 }
22
23 template<class T>
24 static inline void assign_cond(T &, T const&, boost::mpl::bool_<false> const&) {}
25
26 template<class T>
27 static inline void move_cond(T & l, T & r, boost::mpl::bool_<true> const&)
28 {
29 l = ::boost::move(r);
30 }
31
32 template<class T>
33 static inline void move_cond(T &, T &, boost::mpl::bool_<false> const&) {}
34
35 template <typename T> inline
36 void swap_cond(T & l, T & r, boost::mpl::bool_<true> const&)
37 {
38 ::boost::swap(l, r);
39 }
40
41 template <typename T> inline
42 void swap_cond(T &, T &, boost::mpl::bool_<false> const&) {}
43
44 }}}} // namespace boost::geometry::index::detail
45
46 #endif // BOOST_GEOMETRY_INDEX_DETAIL_UTILITIES_HPP