As shown in the figure, through such a weird writing method, the array length will be obtained in the template function type inference, and by defining the formal parameters in this way, the array length can also be obtained. The C++ compiler is awesome and weird.
[Untitled] In C++, the actual parameter is an array and is passed to the formal parameter. How to get the length of the array in the formal parameter?
おすすめ
転載: blog.csdn.net/zhangzhangkeji/article/details/132929478
おすすめ
ランキング