123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- #include <type_traits>
- #include <boost/swap.hpp>
- #ifndef BOOST_GEOMETRY_INDEX_DETAIL_UTILITIES_HPP
- #define BOOST_GEOMETRY_INDEX_DETAIL_UTILITIES_HPP
- namespace boost { namespace geometry { namespace index { namespace detail {
- template<class T>
- static inline void assign_cond(T & l, T const& r, std::true_type)
- {
- l = r;
- }
- template<class T>
- static inline void assign_cond(T &, T const&, std::false_type) {}
- template<class T>
- static inline void move_cond(T & l, T & r, std::true_type)
- {
- l = ::boost::move(r);
- }
- template<class T>
- static inline void move_cond(T &, T &, std::false_type) {}
- template <typename T> inline
- void swap_cond(T & l, T & r, std::true_type)
- {
- ::boost::swap(l, r);
- }
- template <typename T> inline
- void swap_cond(T &, T &, std::false_type) {}
- }}}}
- #endif
|