aboutsummaryrefslogtreecommitdiff
path: root/third-party/boost-math/include/boost/math/ccmath/detail/swap.hpp
blob: ccca9601ceee0fc8fa9e80ffe8683ab35b6e2c47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//  (C) Copyright Matt Borland 2021.
//  Use, modification and distribution are subject to the
//  Boost Software License, Version 1.0. (See accompanying file
//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

#ifndef BOOST_MATH_CCMATH_DETAIL_SWAP_HPP
#define BOOST_MATH_CCMATH_DETAIL_SWAP_HPP

namespace boost::math::ccmath::detail {

template <typename T>
inline constexpr void swap(T& x, T& y) noexcept
{
    T temp = x;
    x = y;
    y = temp;
}

}

#endif // BOOST_MATH_CCMATH_DETAIL_SWAP_HPP