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
15namespace boost { namespace geometry { namespace index { namespace detail {
16
17template<class T>
18static inline void assign_cond(T & l, T const& r, boost::mpl::bool_<true> const&)
19{
20 l = r;
21}
22
23template<class T>
24static inline void assign_cond(T &, T const&, boost::mpl::bool_<false> const&) {}
25
26template<class T>
27static inline void move_cond(T & l, T & r, boost::mpl::bool_<true> const&)
28{
29 l = ::boost::move(r);
30}
31
32template<class T>
33static inline void move_cond(T &, T &, boost::mpl::bool_<false> const&) {}
34
35template <typename T> inline
36void swap_cond(T & l, T & r, boost::mpl::bool_<true> const&)
37{
38 ::boost::swap(l, r);
39}
40
41template <typename T> inline
42void 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
47

source code of boost/boost/geometry/index/detail/utilities.hpp