给定this C++ 11 中添加的 end() 函数如何知道数组的结尾。
最佳答案
我不确定我是否理解您的问题...也许可以这样实现?
namespace std
{
template<class T, size_t N>
T *end(T (&arr)[N]) { return &arr[N]; }
}
关于c++ - C++11的array end()如何找到数组结尾,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18073253/