Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73684 - trunk/boost/fusion/view/single_view/detail
From: joel_at_[hidden]
Date: 2011-08-12 01:11:42


Author: djowel
Date: 2011-08-12 01:11:41 EDT (Fri, 12 Aug 2011)
New Revision: 73684
URL: http://svn.boost.org/trac/boost/changeset/73684

Log:
added static sanity check
Text files modified:
   trunk/boost/fusion/view/single_view/detail/next_impl.hpp | 8 +++++---
   1 files changed, 5 insertions(+), 3 deletions(-)

Modified: trunk/boost/fusion/view/single_view/detail/next_impl.hpp
==============================================================================
--- trunk/boost/fusion/view/single_view/detail/next_impl.hpp (original)
+++ trunk/boost/fusion/view/single_view/detail/next_impl.hpp 2011-08-12 01:11:41 EDT (Fri, 12 Aug 2011)
@@ -2,13 +2,14 @@
     Copyright (c) 2001-2006 Joel de Guzman
     Copyright (c) 2011 Eric Niebler
 
- Distributed under the Boost Software License, Version 1.0. (See accompanying
+ 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(BOOST_FUSION_SINGLE_VIEW_NEXT_IMPL_05052005_0331)
 #define BOOST_FUSION_SINGLE_VIEW_NEXT_IMPL_05052005_0331
 
 #include <boost/mpl/next.hpp>
+#include <boost/static_assert.hpp>
 
 namespace boost { namespace fusion
 {
@@ -26,16 +27,17 @@
         struct next_impl<single_view_iterator_tag>
         {
             template <typename Iterator>
- struct apply
+ struct apply
             {
                 typedef single_view_iterator<
                     typename Iterator::single_view_type,
                     typename mpl::next<typename Iterator::position>::type>
                 type;
-
+
                 static type
                 call(Iterator const& i)
                 {
+ BOOST_STATIC_ASSERT((type::position::value < 2));
                     return type(i.view);
                 }
             };


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