This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/54320] [c++11] range access to VLA


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]