Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
鉴于此,C++ 11 中添加的 end() 函数如何知道数组的结尾。
我不确定我是否理解你的问题......也许可以这样实现?
namespace std { template<class T, size_t N> T *end(T (&arr)[N]) { return &arr[N]; } }