Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost 1.56.0 compilation error in iterator_range
From: gast128 (gast128_at_[hidden])
Date: 2014-08-10 04:08:53


On 8/9/2014 11:55 PM, Eric Niebler wrote:
> On 8/9/2014 12:46 PM, Eric Niebler wrote:
>> On 8/9/2014 4:10 AM, gast128 wrote:
>>> I get a compilation error with vc10, iterator_range and a (const)
>>> unordered_map (the beta candidate 2 was still ok I think):
>>>
>>> #include "stdafx.h"
>>> #include <boost/range/iterator_range.hpp>
>>> #include <boost/unordered_map.hpp>
>>>
>>> int _tmain(int /*argc*/, _TCHAR* /*argv*/[])
>>> {
>>> typedef boost::unordered_map<int, int> Container;
>>> typedef Container::const_iterator ContainerIterator;
>>> typedef boost::iterator_range<ContainerIterator> ContainerIteratorRange;
>>>
>>> const Container cnt;
>>>
>>> ContainerIteratorRange rng(cnt.cbegin(), cnt.cend());
>>>
>>> return 0;
>>> }
>>>
>>> This gives C2248:
>>>
>>> 'boost::unordered::iterator_detail::c_iterator<Node,ConstNodePointer>::iterator'
>>>
>>> cannot access private typedef declared in class
>
>
> A possible fix:
> https://github.com/boostorg/range/pull/19
>
> \e

https://svn.boost.org/trac/boost/ticket/10336


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