From 7abc568a53094e22f695d0a60f70644fdb33591d Mon Sep 17 00:00:00 2001 From: bolero-MURAKAMI Date: Thu, 13 Oct 2011 05:12:00 +0900 Subject: [PATCH] =?UTF-8?q?fixed=5Fcontainer=5Ftraits=20=E3=82=92=E3=83=87?= =?UTF-8?q?=E3=83=95=E3=82=A9=E3=83=AB=E3=83=88=E3=81=A7=20const=20?= =?UTF-8?q?=E3=81=AB=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sprout/adapt/sscrisk/cel/array.hpp | 22 ++-------------------- sprout/fixed_container/traits.hpp | 20 +++++++++++++++++++- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/sprout/adapt/sscrisk/cel/array.hpp b/sprout/adapt/sscrisk/cel/array.hpp index 74d3c34c..3ca62fcb 100644 --- a/sprout/adapt/sscrisk/cel/array.hpp +++ b/sprout/adapt/sscrisk/cel/array.hpp @@ -36,26 +36,8 @@ namespace sprout { { public: typedef sscrisk::cel::array fixed_container_type; - typedef fixed_container_type internal_type; - typedef internal_type clone_type; - typedef sprout::index_iterator iterator; - typedef sprout::index_iterator const_iterator; - public: - SPROUT_STATIC_CONSTEXPR typename sprout::detail::fixed_container_traits_base::size_type fixed_size - = std::tuple_size::type>::value - ; - }; - // - // fixed_container_traits - // - template - struct fixed_container_traits const> - : public sprout::detail::fixed_container_traits_base const> - { - public: - typedef sscrisk::cel::array const fixed_container_type; - typedef typename std::remove_const::type internal_type; - typedef internal_type clone_type; + typedef sscrisk::cel::array internal_type; + typedef sscrisk::cel::array clone_type; typedef sprout::index_iterator iterator; typedef sprout::index_iterator const_iterator; public: diff --git a/sprout/fixed_container/traits.hpp b/sprout/fixed_container/traits.hpp index 07765328..8b73646a 100644 --- a/sprout/fixed_container/traits.hpp +++ b/sprout/fixed_container/traits.hpp @@ -48,7 +48,7 @@ namespace sprout { typedef Container internal_type; typedef Container clone_type; public: - SPROUT_STATIC_CONSTEXPR typename sprout::detail::fixed_container_traits_base::size_type fixed_size + SPROUT_STATIC_CONSTEXPR typename sprout::detail::fixed_container_traits_base::size_type fixed_size = std::tuple_size::type>::value ; }; @@ -63,6 +63,24 @@ namespace sprout { public: SPROUT_STATIC_CONSTEXPR typename sprout::detail::fixed_container_traits_base::size_type fixed_size = N; }; + template + struct fixed_container_traits + : public sprout::fixed_container_traits + { + public: + typedef typename sprout::fixed_container_traits::const_iterator iterator; + typedef typename sprout::fixed_container_traits::const_reference reference; + typedef typename sprout::fixed_container_traits::const_pointer pointer; + }; + template + struct fixed_container_traits + : public sprout::fixed_container_traits + { + public: + typedef typename sprout::fixed_container_traits::const_iterator iterator; + typedef typename sprout::fixed_container_traits::const_reference reference; + typedef typename sprout::fixed_container_traits::const_pointer pointer; + }; // // rebind_fixed_size