我有一双
begin()
/
end()
方法声明如下:
template <typename... Ts>
Iterator begin(Ts... indices) const;
template <typename... Ts>
Iterator end(Ts... indices) const;
逻辑上
结束()
可以在以下方面实现
开始()
明确地
end(x, y, ..., z)
等于
begin(x, y, ..., z + 1)
那么,有没有干净的转弯方式
x, y, ..., z
进入
x, y, ..., z + 1
使用
indices
,以便我能够实现
结束()
喜欢
template <typename... Ts>
Iterator end(Ts... indices) const {
return begin(whatever to do with indices...);
}