swap.hpp 518 B

123456789101112131415161718192021
  1. // (C) Copyright Matt Borland 2021.
  2. // Use, modification and distribution are subject to the
  3. // Boost Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. #ifndef BOOST_MATH_CCMATH_DETAIL_SWAP_HPP
  6. #define BOOST_MATH_CCMATH_DETAIL_SWAP_HPP
  7. namespace boost::math::ccmath::detail {
  8. template <typename T>
  9. inline constexpr void swap(T& x, T& y) noexcept
  10. {
  11. T temp = x;
  12. x = y;
  13. y = temp;
  14. }
  15. }
  16. #endif // BOOST_MATH_CCMATH_DETAIL_SWAP_HPP