new caontainers functions

atWhere()
lastAtWhere()
contains(v)
filter(), map(), reduce(), forEach() indexed and reverse variants
fix PIDeque reverse for
fix insert with move of complex type potential segfault
This commit is contained in:
Бычков Андрей
2022-08-12 18:14:55 +03:00
parent f07f814b08
commit 00f7a24d54
6 changed files with 555 additions and 38 deletions

View File

@@ -26,6 +26,7 @@
#define PISTACK_H
#include "pivector.h"
#include "pideque.h"
template<typename T>
class PIStack: public PIVector<T> {
@@ -37,6 +38,7 @@ public:
T & top() {return PIVector<T>::back();}
const T & top() const {return PIVector<T>::back();}
PIVector<T> toVector() {return PIVector<T>(*this);}
PIVector<T> toDeque() {return PIDeque<T>(PIVector<T>::data(), PIVector<T>::size());}
};
#endif // PISTACK_H