/// \file // Range v3 library // // Copyright Eric Niebler 2013-present // // Use, modification and distribution is 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) // // Project home: https://github.com/ericniebler/range-v3 // #ifndef RANGES_V3_UTILITY_MOVE_HPP #define RANGES_V3_UTILITY_MOVE_HPP #include #include #include #include namespace ranges { namespace aux { /// \ingroup group-utility struct move_fn : move_tag { template constexpr auto operator()(T && t) const noexcept -> meta::_t> && { return static_cast> &&>(t); } /// \ingroup group-utility /// \sa `move_fn` template friend constexpr decltype(auto) operator|(T && t, move_fn move) noexcept { return move(t); } }; /// \ingroup group-utility /// \sa `move_fn` RANGES_INLINE_VARIABLE(move_fn, move) /// \ingroup group-utility /// \sa `move_fn` template using move_t = meta::if_c::value, meta::_t> &&, detail::decay_t>; } // namespace aux } // namespace ranges #endif