Files
pip/main.cpp
2021-07-16 14:11:55 +03:00

23 lines
485 B
C++

#include "pip.h"
template <typename S, typename T, typename std::enable_if<
std::is_same<T, PIVector<S>>::value
, int>::type = 0> PIVector<S> rrr(PIVector<T>) {
piCout << std::is_same<T, PIVector<S>>::value;
return PIVector<S>();
}
int main() {
PIVector<int> x;
x.resize(16, [](size_t i) {return i+1;});
piCout << x;
PIVector<PIVector<int>> m = x.reshape(4,4);
piCout << m;
PIVector<int> y;
y = m.reshape<int>();
piCout << y;
return 0;
}