This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/54320] [c++11] range access to VLA
- From: "jason at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 10 May 2013 19:40:41 +0000
- Subject: [Bug c++/54320] [c++11] range access to VLA
- Auto-submitted: auto-generated
- References: <bug-54320-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54320
--- Comment #12 from Jason Merrill <jason at gcc dot gnu.org> ---
(In reply to vincenzo Innocente from comment #3)
> int foo2(int N) {
> int v[N];
> for ( auto a : v)
> if (a) return a;
> return 0;
> }
>
> works, though was similar to std::begin(v) std::end(v)
Similar, but not the same:
"if _RangeT is an array type, begin-expr and end-expr are __range and __range +
__bound, respectively, where __bound is the array bound."