Static arrays at compile time in C++

后端 未结 3 1348
囚心锁ツ
囚心锁ツ 2021-02-03 16:21

I was wondering if its possible to make the following answer more generic, in the sense that the type of the array be templated instead of just unsigned:

I\'ve enclosed

3条回答
  •  梦毁少年i
    2021-02-03 16:59

    Erm... Why don't you just use std::vector? Or if you want a non-resiable array, then use the equivalent type in boost?

提交回复
热议问题