r179949 - VLAs in C++14!

Richard Smith richard at metafoo.co.uk
Sat Apr 20 07:43:08 PDT 2013


On Sat, Apr 20, 2013 at 6:46 AM, Matthieu Monrocq <
matthieu.monrocq at gmail.com> wrote:

> Without the link I cannot confirm, is this "true" VLA or is it
> `std::dyn_array` ?
>

What we voted in is pretty close to this:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3497.html

Quick summary:

struct S {
  S();
  ~S();
};
void f(int n) {
  S array[n];
  [&array] { // ok
    for (decltype(auto) s : array) { // ok
      // ...
    }
  }
  [=array] {} // error
  sizeof(array); // error
  decltype(array) array2; // error
  int nested1[n][2]; // ok
  int nested2[2][n]; // error
  typedef int td[n]; // error
}

On Sat, Apr 20, 2013 at 3:33 PM, Stephen Lin <swlin at post.harvard.edu> wrote:
>
>> Oh dear, are they adopting the runtime-evaluated "sizeof" too??
>>
>> On Sat, Apr 20, 2013 at 9:20 AM, Richard Smith
>> <richard-llvm at metafoo.co.uk> wrote:
>> > Author: rsmith
>> > Date: Sat Apr 20 08:20:33 2013
>> > New Revision: 179949
>> >
>> > URL: http://llvm.org/viewvc/llvm-project?rev=179949&view=rev
>> > Log:
>> > VLAs in C++14!
>> >
>> > Modified:
>> >     cfe/trunk/www/cxx_status.html
>> >
>> > Modified: cfe/trunk/www/cxx_status.html
>> > URL:
>> http://llvm.org/viewvc/llvm-project/cfe/trunk/www/cxx_status.html?rev=179949&r1=179948&r2=179949&view=diff
>> >
>> ==============================================================================
>> > --- cfe/trunk/www/cxx_status.html (original)
>> > +++ cfe/trunk/www/cxx_status.html Sat Apr 20 08:20:33 2013
>> > @@ -427,7 +427,7 @@ available.</p>
>> >        <td class="none" align="center">No</td>
>> >      </tr>
>> >      <tr>
>> > -      <td>[PROVISIONAL] Runtime-sized arrays with automatic storage
>> duration</td>
>> > +      <td>Runtime-sized arrays with automatic storage duration</td>
>> >        <td><a href="
>> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3639.html
>> ">N3639</a></td>
>> >        <td class="none" align="center">Partial</td>
>> >      </tr>
>> > @@ -459,7 +459,7 @@ available.</p>
>> >      <tr>
>> >        <td>Clarifying memory allocation</td>
>> >        <td><a href="
>> http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3664.html
>> ">N3664</a></td>
>> > -      <td class="none" align="center">No</td>
>> > +      <td class="none" align="center">Partial</td>
>> >      </tr>
>> >  </table>
>> >
>> >
>> >
>> > _______________________________________________
>> > cfe-commits mailing list
>> > cfe-commits at cs.uiuc.edu
>> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130420/c0311991/attachment.html>


More information about the cfe-commits mailing list