From 26e8b5e45903a4ed0bc667947e22d7ae0e7d5b3f Mon Sep 17 00:00:00 2001 From: Nikita Kniazev Date: Wed, 10 Oct 2018 01:53:34 +0300 Subject: [PATCH] vector: Simplify assign_sequence --- .../boost/fusion/container/vector/vector.hpp | 21 ++++++------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/include/boost/fusion/container/vector/vector.hpp b/include/boost/fusion/container/vector/vector.hpp index 4993e2eb..abe2d7bb 100644 --- a/include/boost/fusion/container/vector/vector.hpp +++ b/include/boost/fusion/container/vector/vector.hpp @@ -214,21 +214,12 @@ namespace boost { namespace fusion void assign_sequence(Sequence&& seq) { - assign(std::forward(seq), detail::index_sequence()); - } - - template - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - void - assign(Sequence&&, detail::index_sequence<>) {} - - template - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - void - assign(Sequence&& seq, detail::index_sequence) - { - at_impl(mpl::int_()) = vector_detail::forward_at_c(seq); - assign(std::forward(seq), detail::index_sequence()); +#ifndef BOOST_NO_CXX17_FOLD_EXPRESSIONS + (void(store::elem = vector_detail::forward_at_c(static_cast(seq))), ...); +#else + int nofold[] = { (void(store::elem = vector_detail::forward_at_c(static_cast(seq))), 0)..., 0 }; + (void)nofold; +#endif } template