Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

5 anos atrás
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /// \file
  2. // Range v3 library
  3. //
  4. // Copyright Eric Niebler 2013-present
  5. //
  6. // Use, modification and distribution is subject to the
  7. // Boost Software License, Version 1.0. (See accompanying
  8. // file LICENSE_1_0.txt or copy at
  9. // http://www.boost.org/LICENSE_1_0.txt)
  10. //
  11. // Project home: https://github.com/ericniebler/range-v3
  12. //
  13. // The implementation of swap (see below) has been adapted from libc++
  14. // (http://libcxx.llvm.org).
  15. #ifndef RANGES_V3_UTILITY_SWAP_HPP
  16. #define RANGES_V3_UTILITY_SWAP_HPP
  17. #include <concepts/swap.hpp>
  18. #include <range/v3/range_fwd.hpp>
  19. #include <range/v3/utility/static_const.hpp>
  20. namespace ranges
  21. {
  22. template<typename T>
  23. using is_swappable = concepts::is_swappable<T>;
  24. template<typename T>
  25. using is_nothrow_swappable = concepts::is_nothrow_swappable<T>;
  26. template<typename T, typename U>
  27. using is_swappable_with = concepts::is_swappable_with<T, U>;
  28. template<typename T, typename U>
  29. using is_nothrow_swappable_with = concepts::is_nothrow_swappable_with<T, U>;
  30. using concepts::exchange;
  31. /// \ingroup group-utility
  32. /// \relates concepts::adl_swap_detail::swap_fn
  33. RANGES_DEFINE_CPO(uncvref_t<decltype(concepts::swap)>, swap)
  34. namespace cpp20
  35. {
  36. using ranges::swap;
  37. }
  38. } // namespace ranges
  39. #endif