/* Copyright 2023 Joaquin M Lopez Munoz. * Distributed under 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) * * See https://www.boost.org/libs/unordered for library home page. */ #ifndef BOOST_UNORDERED_DETAIL_FOA_TUPLE_ROTATE_RIGHT_HPP #define BOOST_UNORDERED_DETAIL_FOA_TUPLE_ROTATE_RIGHT_HPP #include #include #include #include namespace boost{ namespace unordered{ namespace detail{ namespace foa{ template using tuple_rotate_right_return_type=mp11::mp_rotate_right_c< typename std::remove_cv::type>::type, 1 >; template tuple_rotate_right_return_type tuple_rotate_right_aux(mp11::index_sequence,Tuple&& x) { return tuple_rotate_right_return_type{ std::get<(Is+sizeof...(Is)-1)%sizeof...(Is)>(std::forward(x))...}; } template tuple_rotate_right_return_type tuple_rotate_right(Tuple&& x) { using RawTuple=typename std::remove_cv< typename std::remove_reference::type>::type; return tuple_rotate_right_aux( mp11::make_index_sequence::value>{}, std::forward(x)); } } /* namespace foa */ } /* namespace detail */ } /* namespace unordered */ } /* namespace boost */ #endif