/*============================================================================= Copyright (c) 2006 Eric Niebler 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) ==============================================================================*/ #if !defined(FUSION_SIZE_S_08112006_1141) #define FUSION_SIZE_S_08112006_1141 #include #include #include #include #include #include namespace boost { namespace fusion { /////////////////////////////////////////////////////////////////////////// // calculates the size of any segmented data structure. template::value> struct segmented_size; namespace detail { struct size_plus { template struct result; template struct result : mpl::plus< segmented_size::type> , typename remove_reference::type > {}; }; } /////////////////////////////////////////////////////////////////////////// template struct segmented_size : result_of::fold< typename result_of::segments::type , mpl::size_t<0> , detail::size_plus >::type {}; template struct segmented_size : result_of::size {}; }} #endif