[Boost-bugs] [Boost C++ Libraries] #1814: foreach broken by is_char_array mpl assertion.

Subject: [Boost-bugs] [Boost C++ Libraries] #1814: foreach broken by is_char_array mpl assertion.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-04-11 08:51:41


#1814: foreach broken by is_char_array mpl assertion.
---------------------------------+------------------------------------------
 Reporter: pluto_at_[hidden] | Owner: eric_niebler
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: foreach
  Version: Boost 1.35.0 | Severity: Regression
 Keywords: |
---------------------------------+------------------------------------------
 please consider following testcase that works fine with boost-1.34:

 {{{
 struct IV
 {
         typedef std::vector< int > C;
         typedef C::const_iterator const_iterator;
         virtual const_iterator begin() const = 0;
         virtual const_iterator end() const = 0;
 };

 void test_foreach( IV const& iv )
 {
         BOOST_FOREACH( int i, iv )
         {
         }
 }
 }}}

 with boost-1.35 i got an error:
 {{{
 boost/foreach.hpp(357) : error C2259: 'IV' : cannot instantiate abstract
 class
         due to following members:
         'IV::const_iterator IV::begin(void) const' : is abstract
 (...)
         'IV::const_iterator IV::end(void) const' : is abstract
 (...)
         boost/foreach.hpp(357) : see reference to class template
 instantiation
 'boost::foreach_detail_::foreach_iterator<T,C>::IS_THIS_AN_ARRAY_OR_A_NULL_TERMINATED_STRING23'
 being compiled (...)
 }}}

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1814>
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:49:57 UTC