|
@@ -199,6 +199,17 @@ public:
|
|
|
dynamic_cast<Data<T> *>(_data.get())->operator()(value);
|
|
|
}
|
|
|
|
|
|
+ template<typename T>
|
|
|
+ void operator()(T *&value) const {
|
|
|
+ const std::valarray<T>& array = std::any_cast<const std::valarray<T>&>(*dynamic_cast<Data<T> *>(_data.get()));
|
|
|
+ unsigned int index = 0;
|
|
|
+
|
|
|
+ value = new T[size()];
|
|
|
+ for (const auto& e: array) {
|
|
|
+ value[index++] = e;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
template<typename T>
|
|
|
void operator()(std::vector<T> &value) const {
|
|
|
dynamic_cast<Data<T> *>(_data.get())->operator()(value);
|