Zero-length C-array binds to pointer type

前端 未结 6 1218
误落风尘
误落风尘 2020-12-17 20:10

I recently wrote a function template which takes a reference to a C-array:

template 
void foo(T(&c_array)[N]);

6条回答
  •  清酒与你
    2020-12-17 21:00

    The GCC Manual has a whole thing on zero length arrays. This is a GCC extension as is somewhat analogous to incomplete arrays.

提交回复
热议问题