[Boost-bugs] [Boost C++ Libraries] #3044: mpl::aux_::iter_fold_if_impl allows deref l_end

Subject: [Boost-bugs] [Boost C++ Libraries] #3044: mpl::aux_::iter_fold_if_impl allows deref l_end
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-05-18 16:06:04


#3044: mpl::aux_::iter_fold_if_impl allows deref l_end
---------------------------------------+------------------------------------
 Reporter: cppljevans_at_[hidden] | Owner:
     Type: Bugs | Status: new
Milestone: Boost 1.40.0 | Component: None
  Version: Boost 1.38.0 | Severity: Problem
 Keywords: |
---------------------------------------+------------------------------------
 The mpl::aux_::iter_fold_if_impl template:

   https://svn.boost.org/trac/boost/browser/trunk/boost/mpl/aux_
     /iter_fold_if_impl.hpp

 allows deref'ing of an end iterator. The problem is most easily
 shown with list because deref<l_end> is not possible.
 Apparently, deref of an end iterator from other sequences
 (e.g. vector or range_c) allow deref of an end iterator.

 The attached:

   iter_fold_if_bkprotect.zip

 illustrates the problem. The attached:

   iter_fold_if_bkprotect2.zip

 illustrates the cause. The attached:

   while.cpp

 illustrates a solution. However, the while.cpp suffers from the
 template instantiation depth problem described here:

   http://www.mywikinet.com/mpl/paper
     /mpl_paper.html#sequences.unrolling

 More (*maybe* helpful) details can be found at the following
 boost ml thread:

   http://thread.gmane.org/gmane.comp.lib.boost.devel/187289

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3044>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:00 UTC