move.hpp 689 B

123456789101112131415161718192021222324
  1. /*=============================================================================
  2. Copyright (c) 2014 Paul Fultz II
  3. move.h
  4. Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. ==============================================================================*/
  7. #ifndef BOOST_HOF_GUARD_MOVE_H
  8. #define BOOST_HOF_GUARD_MOVE_H
  9. #include <utility>
  10. namespace boost { namespace hof {
  11. template<typename T>
  12. constexpr typename std::remove_reference<T>::type&&
  13. move(T&& x) noexcept
  14. {
  15. return static_cast<typename std::remove_reference<T>::type&&>(x);
  16. }
  17. }} // namespace boost::hof
  18. #endif