Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:35:33

0001 // Boost.Geometry Index
0002 //
0003 // Copyright (c) 2011-2023 Adam Wulkiewicz, Lodz, Poland.
0004 //
0005 // This file was modified by Oracle on 2020.
0006 // Modifications copyright (c) 2020 Oracle and/or its affiliates.
0007 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
0008 //
0009 // Use, modification and distribution is subject to the Boost Software License,
0010 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
0011 // http://www.boost.org/LICENSE_1_0.txt)
0012 
0013 #include <type_traits>
0014 
0015 #include <boost/core/invoke_swap.hpp>
0016 
0017 #ifndef BOOST_GEOMETRY_INDEX_DETAIL_UTILITIES_HPP
0018 #define BOOST_GEOMETRY_INDEX_DETAIL_UTILITIES_HPP
0019 
0020 namespace boost { namespace geometry { namespace index { namespace detail {
0021 
0022 template<class T>
0023 static inline void assign_cond(T & l, T const& r, std::true_type)
0024 {
0025     l = r;
0026 }
0027 
0028 template<class T>
0029 static inline void assign_cond(T &, T const&, std::false_type) {}
0030 
0031 template<class T>
0032 static inline void move_cond(T & l, T & r, std::true_type)
0033 {
0034     l = std::move(r);
0035 }
0036 
0037 template<class T>
0038 static inline void move_cond(T &, T &, std::false_type) {}
0039 
0040 template <typename T> inline
0041 void swap_cond(T & l, T & r, std::true_type)
0042 {
0043     ::boost::core::invoke_swap(l, r);
0044 }
0045 
0046 template <typename T> inline
0047 void swap_cond(T &, T &, std::false_type) {}
0048 
0049 }}}} // namespace boost::geometry::index::detail
0050 
0051 #endif // BOOST_GEOMETRY_INDEX_DETAIL_UTILITIES_HPP