/**************************************************************************** * Copyright (c) 2017-2022 by the ArborX authors * * All rights reserved. * * * * This file is part of the ArborX library. ArborX is * * distributed under a BSD 3-clause license. For the licensing terms see * * the LICENSE file in the top-level directory. * * * * SPDX-License-Identifier: BSD-3-Clause * ****************************************************************************/ #ifndef ARBORX_DETAILS_KOKKOS_EXT_SWAP_HPP #define ARBORX_DETAILS_KOKKOS_EXT_SWAP_HPP #include #include #include namespace ArborX::Details::KokkosExt { template KOKKOS_FUNCTION constexpr void swap(T &a, T &b) noexcept(std::is_nothrow_move_constructible_v &&std::is_nothrow_move_assignable_v) { T tmp = std::move(a); a = std::move(b); b = std::move(tmp); } } // namespace ArborX::Details::KokkosExt #endif