From d3f0738bf4f9d51447b84daa1d18c2742b8e707b Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Sat, 18 Jan 2020 18:31:06 +0200 Subject: [PATCH] mp_rotate_*: remove default rotation count --- include/boost/mp11/algorithm.hpp | 8 ++++---- test/mp_rotate_left.cpp | 17 +---------------- test/mp_rotate_right.cpp | 17 +---------------- 3 files changed, 6 insertions(+), 36 deletions(-) diff --git a/include/boost/mp11/algorithm.hpp b/include/boost/mp11/algorithm.hpp index fea5bc6..4ec9aea 100644 --- a/include/boost/mp11/algorithm.hpp +++ b/include/boost/mp11/algorithm.hpp @@ -1147,12 +1147,12 @@ template class L, class... T, std::size_t N> struct mp_rotate } // namespace detail -template using mp_rotate_left_c = typename detail::mp_rotate_impl, detail::left_rotation>::type; -template> using mp_rotate_left = mp_rotate_left_c; +template using mp_rotate_left_c = typename detail::mp_rotate_impl, detail::left_rotation>::type; +template using mp_rotate_left = mp_rotate_left_c; // mp_rotate_right(_c) -template using mp_rotate_right_c = typename detail::mp_rotate_impl, detail::right_rotation>::type; -template> using mp_rotate_right = mp_rotate_right_c; +template using mp_rotate_right_c = typename detail::mp_rotate_impl, detail::right_rotation>::type; +template using mp_rotate_right = mp_rotate_right_c; // mp_min_element // mp_max_element diff --git a/test/mp_rotate_left.cpp b/test/mp_rotate_left.cpp index bccbbe4..0735eed 100644 --- a/test/mp_rotate_left.cpp +++ b/test/mp_rotate_left.cpp @@ -1,5 +1,5 @@ -// Copyright 2015 Peter Dimov. +// Copyright 2015 Peter Dimov. // // Distributed under the Boost Software License, Version 1.0. // @@ -31,9 +31,6 @@ int main() { using L1 = mp_list<>; - BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); - BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); - BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); @@ -48,9 +45,6 @@ int main() using L2 = mp_list; - BOOST_TEST_TRAIT_TRUE((std::is_same, mp_list>)); - BOOST_TEST_TRAIT_TRUE((std::is_same, mp_list>)); - BOOST_TEST_TRAIT_TRUE((std::is_same, mp_list>)); BOOST_TEST_TRAIT_TRUE((std::is_same, mp_list>)); BOOST_TEST_TRAIT_TRUE((std::is_same, mp_list>)); @@ -79,9 +73,6 @@ int main() { using L1 = std::tuple<>; - BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); - BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); - BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); @@ -96,9 +87,6 @@ int main() using L2 = std::tuple; - BOOST_TEST_TRAIT_TRUE((std::is_same, std::tuple>)); - BOOST_TEST_TRAIT_TRUE((std::is_same, std::tuple>)); - BOOST_TEST_TRAIT_TRUE((std::is_same, std::tuple>)); BOOST_TEST_TRAIT_TRUE((std::is_same, std::tuple>)); BOOST_TEST_TRAIT_TRUE((std::is_same, std::tuple>)); @@ -127,9 +115,6 @@ int main() { using L1 = std::pair; - BOOST_TEST_TRAIT_TRUE((std::is_same, std::pair>)); - BOOST_TEST_TRAIT_TRUE((std::is_same, std::pair>)); - BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); diff --git a/test/mp_rotate_right.cpp b/test/mp_rotate_right.cpp index 92d6854..14ac5d4 100644 --- a/test/mp_rotate_right.cpp +++ b/test/mp_rotate_right.cpp @@ -1,5 +1,5 @@ -// Copyright 2015 Peter Dimov. +// Copyright 2015 Peter Dimov. // // Distributed under the Boost Software License, Version 1.0. // @@ -31,9 +31,6 @@ int main() { using L1 = mp_list<>; - BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); - BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); - BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); @@ -48,9 +45,6 @@ int main() using L2 = mp_list; - BOOST_TEST_TRAIT_TRUE((std::is_same, mp_list>)); - BOOST_TEST_TRAIT_TRUE((std::is_same, mp_list>)); - BOOST_TEST_TRAIT_TRUE((std::is_same, mp_list>)); BOOST_TEST_TRAIT_TRUE((std::is_same, mp_list>)); BOOST_TEST_TRAIT_TRUE((std::is_same, mp_list>)); @@ -79,9 +73,6 @@ int main() { using L1 = std::tuple<>; - BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); - BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); - BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); @@ -96,9 +87,6 @@ int main() using L2 = std::tuple; - BOOST_TEST_TRAIT_TRUE((std::is_same, std::tuple>)); - BOOST_TEST_TRAIT_TRUE((std::is_same, std::tuple>)); - BOOST_TEST_TRAIT_TRUE((std::is_same, std::tuple>)); BOOST_TEST_TRAIT_TRUE((std::is_same, std::tuple>)); BOOST_TEST_TRAIT_TRUE((std::is_same, std::tuple>)); @@ -127,9 +115,6 @@ int main() { using L1 = std::pair; - BOOST_TEST_TRAIT_TRUE((std::is_same, std::pair>)); - BOOST_TEST_TRAIT_TRUE((std::is_same, std::pair>)); - BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); BOOST_TEST_TRAIT_TRUE((std::is_same, L1>));