#ifndef SPROUT_CONTAINER_WEAK_REBIND_SIZE_HPP #define SPROUT_CONTAINER_WEAK_REBIND_SIZE_HPP #include #include #include namespace sprout { namespace containers { namespace detail { template< typename T, template::size_type> class = T::template rebind_size > std::true_type sprout_has_xxx_impl_check_template_rebind_size(int); template std::false_type sprout_has_xxx_impl_check_template_rebind_size(long); template struct has_rebind_size : decltype(sprout::containers::detail::sprout_has_xxx_impl_check_template_rebind_size(0)) {}; } // namespace detail // // is_rebindable_size // template struct is_rebindable_size : public sprout::containers::detail::has_rebind_size< sprout::container_transform_traits > {}; template struct is_rebindable_size : public sprout::containers::is_rebindable_size {}; template struct is_rebindable_size : public sprout::containers::is_rebindable_size {}; template struct is_rebindable_size : public sprout::containers::is_rebindable_size {}; namespace detail { template::size_type Size, typename = void> struct weak_rebind_size_impl; template::size_type Size> struct weak_rebind_size_impl< Container, Size, typename std::enable_if::value>::type > : public sprout::container_transform_traits::template rebind_size {}; template::size_type Size> struct weak_rebind_size_impl< Container, Size, typename std::enable_if::value>::type > { public: typedef Container type; }; } // namespace detail // // weak_rebind_size // template::size_type Size> struct weak_rebind_size : public sprout::containers::detail::weak_rebind_size_impl {}; } // namespace containers } // namespace sprout #endif // #ifndef SPROUT_CONTAINER_WEAK_REBIND_SIZE_HPP