|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r56607 - trunk/boost/fusion/view/nview/detail
From: hartmut.kaiser_at_[hidden]
Date: 2009-10-05 18:00:10
Author: hkaiser
Date: 2009-10-05 18:00:09 EDT (Mon, 05 Oct 2009)
New Revision: 56607
URL: http://svn.boost.org/trac/boost/changeset/56607
Log:
Fixing mismatch of default parameter values
Text files modified:
trunk/boost/fusion/view/nview/detail/nview_impl.hpp | 20 +++++++++++++++-----
1 files changed, 15 insertions(+), 5 deletions(-)
Modified: trunk/boost/fusion/view/nview/detail/nview_impl.hpp
==============================================================================
--- trunk/boost/fusion/view/nview/detail/nview_impl.hpp (original)
+++ trunk/boost/fusion/view/nview/detail/nview_impl.hpp 2009-10-05 18:00:09 EDT (Mon, 05 Oct 2009)
@@ -10,7 +10,7 @@
#if !defined(BOOST_FUSION_NVIEW_IMPL_SEP_23_2009_1017PM)
#define BOOST_FUSION_NVIEW_IMPL_SEP_23_2009_1017PM
-#include <climits>
+//#include <climits>
#include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/repeat.hpp>
#include <boost/preprocessor/iterate.hpp>
@@ -23,8 +23,6 @@
"boost/fusion/view/nview/detail/nview_impl.hpp")) \
/**/
-#include BOOST_PP_ITERATE()
-
///////////////////////////////////////////////////////////////////////////////
namespace boost { namespace fusion { namespace result_of
{
@@ -35,12 +33,12 @@
typedef mpl::vector_c<
int, BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, I)
> index_type;
-
typedef nview<Sequence, index_type> type;
};
-
}}}
+#include BOOST_PP_ITERATE()
+
#endif
///////////////////////////////////////////////////////////////////////////////
@@ -50,6 +48,18 @@
#define N BOOST_PP_ITERATION()
+#if N < FUSION_MAX_VECTOR_SIZE
+namespace boost { namespace fusion { namespace result_of
+{
+ template <typename Sequence, BOOST_PP_ENUM_PARAMS(N, int I)>
+ struct as_nview<Sequence, BOOST_PP_ENUM_PARAMS(N, I)>
+ {
+ typedef mpl::vector_c<int, BOOST_PP_ENUM_PARAMS(N, I)> index_type;
+ typedef nview<Sequence, index_type> type;
+ };
+}}}
+#endif
+
namespace boost { namespace fusion
{
template<BOOST_PP_ENUM_PARAMS(N, int I), typename Sequence>
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk