/*============================================================================= Copyright (c) 2011-2014 Bolero MURAKAMI https://github.com/bolero-MURAKAMI/Sprout Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ #ifndef SPROUT_CONTAINER_CONTAINER_TRANSFORM_TRAITS_HPP #define SPROUT_CONTAINER_CONTAINER_TRANSFORM_TRAITS_HPP #include #include #include #include #include namespace sprout { // // container_transform_traits // template struct container_transform_traits; namespace detail { template::size_type Size> struct default_array_rebind_size; template< template class Array, typename T, std::size_t N, typename sprout::container_traits >::size_type Size > struct default_array_rebind_size, Size> { public: typedef Array type; }; template struct inherit_default_rebind_size {}; template struct inherit_default_rebind_size< Container, typename std::enable_if::value>::type > { public: template::size_type Size> struct rebind_size : public sprout::detail::default_array_rebind_size {}; }; } // namespace detail template struct container_transform_traits : public sprout::detail::inherit_default_rebind_size {}; template struct container_transform_traits { public: template::size_type Size> struct rebind_size { typedef typename sprout::container_transform_traits::template rebind_size::type const type; }; }; template struct container_transform_traits { public: template::size_type Size> struct rebind_size { public: typedef T type[Size]; }; }; template struct container_transform_traits { public: template::size_type Size> struct rebind_size { public: typedef T const type[Size]; }; }; } // namespace sprout #endif // #ifndef SPROUT_CONTAINER_CONTAINER_TRANSFORM_TRAITS_HPP