|
Boost : |
Subject: Re: [boost] [Multiarray] & [Range] MSVC/gcc warning: returning address of local variable or temporary
From: David Abrahams (dave_at_[hidden])
Date: 2008-11-14 00:01:16
on Thu Nov 13 2008, "Neil Groves" <neil-AT-grovescomputing.com> wrote:
>> > And how else would you implement that?
>>
>> The exact same way we implement it in iterator_facade.
>>
>>
>> http://www.boost.org/doc/libs/1_37_0/libs/iterator/doc/iterator_facade.html#operator>
> I have the same issue in RangeEx. I would like to implement your suggestion.
> Your code looks so fit for purpose that perhaps we should take
> operator_brackets_proxy et al. out of the detail namespace and make it
> common to iterator_facade and to iterator_range?
Sounds fine to me.
>> >Is it illegal for the iterators reference type to be a
>> >non-reference?
>>
>> No, but in C++03 that makes them input iterators or output iterators,
>> but not forward iterators.
>>
>
> I would appreciate a further guidance. Thank you in anticipation for
> your patience.
*p returning T& is in the forward iterator requirements table.
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk