Boost logo

Boost Users :

From: Daniel Krügler (dsp_at_[hidden])
Date: 2006-08-01 02:54:38


Hello,

I observed this weekend, that permutation_iterator cannot provide
compatible conversions, in constrast to all other iterators. The
problem is due to access right violations in the "conversion" pseudo
copy c'tor:

   template<class OtherElementIterator, class OtherIndexIterator>
   permutation_iterator(
       permutation_iterator<OtherElementIterator, OtherIndexIterator>
const& r
       , typename enable_if_convertible<OtherElementIterator,
ElementIterator>::type* = 0
       , typename enable_if_convertible<OtherIndexIterator,
IndexIterator>::type* = 0
       )
     : super_t(r.base()), m_elt_iter(r.m_elt_iter)
   {}

This c'tor cannot be instantiated successfully, even if SFINAE has
allowed that: The private member m_elt_iter cannot be accessed from
another permutation_iterator<OtherElementIterator, OtherIndexIterator>
and the result is a compile error. One should either provide friendship
to permutation_iterator<typename, typename> or the private member
should be readable via a public member function to fix this. I have
provided a corresponding bug report

http://sourceforge.net/tracker/index.php?func=detail&aid=1530999&group_id=7586&atid=107586

It would be very nice, if that fix could go into boost 1.34!

Many thanks and Greetings from Bremen,

Daniel Krügler


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net