From 24d1c7fd1a98014781f4461eed53662b9b7f17e0 Mon Sep 17 00:00:00 2001 From: Kohei Takahashi Date: Wed, 4 Oct 2017 01:43:45 +0900 Subject: [PATCH] Reduce type deduction which is already known. --- .../boost/fusion/container/vector/vector.hpp | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/include/boost/fusion/container/vector/vector.hpp b/include/boost/fusion/container/vector/vector.hpp index 28cc1d20..3fcea6e7 100644 --- a/include/boost/fusion/container/vector/vector.hpp +++ b/include/boost/fusion/container/vector/vector.hpp @@ -133,27 +133,27 @@ namespace boost { namespace fusion BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED store(store const& rhs) - : elem(rhs.get()) + : elem(rhs.elem) {} BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED store& operator=(store const& rhs) { - elem = rhs.get(); + elem = rhs.elem; return *this; } BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED store(store&& rhs) - : elem(static_cast(rhs.get())) + : elem(static_cast(rhs.elem)) {} BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED store& operator=(store&& rhs) { - elem = static_cast(rhs.get()); + elem = static_cast(rhs.elem); return *this; } @@ -168,11 +168,6 @@ namespace boost { namespace fusion : elem(std::forward(rhs)) {} - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - T & get() { return elem; } - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - T const& get() const { return elem; } - T elem; }; @@ -238,16 +233,16 @@ namespace boost { namespace fusion template static BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - auto at_detail(store* this_) -> decltype(this_->get()) + U& at_detail(store* this_) { - return this_->get(); + return this_->elem; } template static BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - auto at_detail(store const* this_) -> decltype(this_->get()) + U const& at_detail(store const* this_) { - return this_->get(); + return this_->elem; } template