Boost logo

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-12 12:27:45


on Wed Nov 12 2008, Thorsten Ottosen <thorsten.ottosen-AT-dezide.com> wrote:

> Do you mean that I can detect the return type of operator[] at
> compile-time and do correct forwarding?

No, I mean you can detect when the return type of operator[] is the same
as the reference type. Maybe if it isn't, you could turn off whatever
you're doing with enable_if or something. Why is iterator_range using
the iterator's operator[], anyway?

-- 
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