/*============================================================================= Copyright (c) 2011-2015 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_WEAK_REBIND_SIZE_HPP #define SPROUT_CONTAINER_WEAK_REBIND_SIZE_HPP #include #include #include #include #include namespace sprout { namespace containers { namespace detail { template< typename T, template::size_type> class = T::template rebind_size > sprout::true_type sprout_has_xxx_impl_check_template_rebind_size(int); template sprout::false_type sprout_has_xxx_impl_check_template_rebind_size(long); #if defined(_MSC_VER) && (_MSC_VER > 1900) template(0))> struct has_rebind_size : public Base_ {}; #else template struct has_rebind_size : public sprout::identity(0))>::type {}; #endif } // 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