正常运行,但是WA。
This commit is contained in:
@@ -98,8 +98,8 @@ public:
|
||||
// // Returns a sorted NEW list.
|
||||
// const List<E> sorted(std::function<bool(const E &, const E &)> const
|
||||
// &isCorrectOrderFunc) const;
|
||||
Iterator<E> &&iterate();
|
||||
Iterator<E> &&iterate(int index);
|
||||
Iterator<E> iterate();
|
||||
Iterator<E> iterate(int index);
|
||||
};
|
||||
|
||||
// template <class E>
|
||||
@@ -456,11 +456,11 @@ template <class E> int List<E>::index(const E &target) const {
|
||||
// const { return List<E>(*this).sort(isCorrectOrderFunc);
|
||||
// }
|
||||
|
||||
template <class E> Iterator<E> &&List<E>::iterate() {
|
||||
template <class E> Iterator<E> List<E>::iterate() {
|
||||
return Iterator<E>(this->head);
|
||||
}
|
||||
|
||||
template <class E> Iterator<E> &&List<E>::iterate(int index) {
|
||||
template <class E> Iterator<E> List<E>::iterate(int index) {
|
||||
// index = this->getIndexInRange(index);
|
||||
if (index == 0) {
|
||||
return Iterator<E>(this->head);
|
||||
|
||||
Reference in New Issue
Block a user