Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/range/v3/utility/swap.hpp was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /// \file
0002 // Range v3 library
0003 //
0004 //  Copyright Eric Niebler 2013-present
0005 //
0006 //  Use, modification and distribution is subject to the
0007 //  Boost Software License, Version 1.0. (See accompanying
0008 //  file LICENSE_1_0.txt or copy at
0009 //  http://www.boost.org/LICENSE_1_0.txt)
0010 //
0011 // Project home: https://github.com/ericniebler/range-v3
0012 //
0013 // The implementation of swap (see below) has been adapted from libc++
0014 // (http://libcxx.llvm.org).
0015 
0016 #ifndef RANGES_V3_UTILITY_SWAP_HPP
0017 #define RANGES_V3_UTILITY_SWAP_HPP
0018 
0019 #include <concepts/swap.hpp>
0020 
0021 #include <range/v3/range_fwd.hpp>
0022 
0023 #include <range/v3/utility/static_const.hpp>
0024 
0025 #include <range/v3/detail/prologue.hpp>
0026 
0027 namespace ranges
0028 {
0029     template<typename T>
0030     using is_swappable = concepts::is_swappable<T>;
0031 
0032     template<typename T>
0033     using is_nothrow_swappable = concepts::is_nothrow_swappable<T>;
0034 
0035     template<typename T, typename U>
0036     using is_swappable_with = concepts::is_swappable_with<T, U>;
0037 
0038     template<typename T, typename U>
0039     using is_nothrow_swappable_with = concepts::is_nothrow_swappable_with<T, U>;
0040 
0041     using concepts::exchange;
0042 
0043     /// \ingroup group-utility
0044     /// \relates concepts::adl_swap_detail::swap_fn
0045     RANGES_DEFINE_CPO(uncvref_t<decltype(concepts::swap)>, swap)
0046 
0047     namespace cpp20
0048     {
0049         using ranges::swap;
0050     }
0051 } // namespace ranges
0052 
0053 #include <range/v3/detail/epilogue.hpp>
0054 
0055 #endif