jeudi 1 février 2018

Does using constexpr in array size prevent it from being a VLA?

Does using constexpr in array size prevent it from being a VLA? For example:

constexpr int buffer_size = 256*2;
char buffer[buffer_size];

Is buffer a VLA (variable length array)? How can I tell? I'm using buffer_size with constexpr int as replacement for macros here.

Aucun commentaire:

Enregistrer un commentaire