|
Boost : |
Subject: Re: [boost] [Config] Macro for C++0x range-based for
From: Dave Abrahams (dave_at_[hidden])
Date: 2010-12-17 18:26:57
On Fri, Dec 17, 2010 at 1:17 PM, Michel MORIN <mimomorin_at_[hidden]> wrote:
> I just wanted to say it is important to fix boost/range/begin.hpp (end.hpp)
> so that the following code does compile.
>
> #include <boost/range/iterator_range.hpp>
> int main(int argc, char* argv[])
> {
> int ar[2] = {2, 2};
> boost::iterator_range<int*> rng(ar, ar + 2);
> for (int i : rng) {} // error: ambiguous calls
> return 0;
> }
>
+1 to that, brother!
-- 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