From 7b5a3975962753c16d4d64e6a0922aff14e7d99b Mon Sep 17 00:00:00 2001 From: bolero-MURAKAMI Date: Tue, 10 Oct 2017 19:16:35 +0900 Subject: [PATCH] fix container traits --- sprout/algorithm/fixed/results.hpp | 2 +- sprout/sub_array/container.hpp | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/sprout/algorithm/fixed/results.hpp b/sprout/algorithm/fixed/results.hpp index ba0a6a4c..31c00d79 100644 --- a/sprout/algorithm/fixed/results.hpp +++ b/sprout/algorithm/fixed/results.hpp @@ -30,7 +30,7 @@ namespace sprout { // template::difference_type RelativeSize> struct resized_relative - : public sprout::identity< + : public std::decay< typename sprout::container_transform_traits ::template rebind_size::static_size + RelativeSize>::type > diff --git a/sprout/sub_array/container.hpp b/sprout/sub_array/container.hpp index 3fcf9eb4..a8b8031e 100644 --- a/sprout/sub_array/container.hpp +++ b/sprout/sub_array/container.hpp @@ -79,23 +79,22 @@ namespace sprout { // template struct container_transform_traits > { + private: + typedef typename sprout::sub_array::internal_type internal_type; + typedef typename sprout::container_construct_traits::copied_type internal_copied_type; public: template >::size_type Size> struct rebind_size { public: typedef sprout::sub_array< - typename sprout::container_transform_traits< - typename sprout::container_construct_traits::copied_type - >::template rebind_size::type + typename sprout::container_transform_traits::template rebind_size::type > type; }; template struct rebind_type { public: typedef sprout::sub_array< - typename sprout::container_transform_traits< - typename sprout::container_construct_traits::copied_type - >::template rebind_type::type + typename sprout::container_transform_traits::template rebind_type::type > type; }; };