Re: [Boost-bugs] [Boost C++ Libraries] #7376: join_iterator.hpp compiler warning

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #7376: join_iterator.hpp compiler warning
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-06-10 20:22:33


#7376: join_iterator.hpp compiler warning
----------------------------------------------+------------------------
  Reporter: Leonid Gershanovich <gleonid@…> | Owner: neilgroves
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: range
   Version: Boost 1.51.0 | Severity: Problem
Resolution: | Keywords:
----------------------------------------------+------------------------

Comment (by anonymous):

 here is a sample code that produces compiler error:

 {{{
 #include "boost/range/join.hpp"

 struct A {};
 struct B: public A {} ;
 struct C: public A {};

 int main()
 {
   B b[10];
   C c[10];
   typedef ::boost::range_detail::join_iterator< const C*, const B* , const
 A&, const A& > join_iterator;
   join_iterator it(::boost::make_iterator_range(c),
                    ::boost::make_iterator_range(b),
                    ::boost::range_detail::join_iterator_begin_tag());
   *it;
 }
 }}}

 '''''error''':''


 ''boost/range/detail/join_iterator.hpp:74:
 error: no match for ternary 'operator?:' in '(selected != 0u) ? *(const
 B*)((const boost::range_detail::join_iterator_union<const C*, const B*,
 const A&>*)this)->boost::range_detail::join_iterator_union<const C*, const
 B*, const A&>::m_it2 : *(const C*)((const
 boost::range_detail::join_iterator_union<const C*, const B*, const
 A&>*)this)->boost::range_detail::join_iterator_union<const C*, const B*,
 const A&>::m_it1'''

 with patch suggested earlier this sample compiles without errors.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7376#comment:3>
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:13 UTC