From d7aea8a164cead92af6110463a38812798fcf31e Mon Sep 17 00:00:00 2001 From: Christian Zimmermann Date: Mon, 22 Oct 2018 17:55:52 +0200 Subject: [PATCH] im com (...) --- src/include/ranges/dynamic_range.h | 41 ++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/src/include/ranges/dynamic_range.h b/src/include/ranges/dynamic_range.h index 843c89e..c8a9020 100644 --- a/src/include/ranges/dynamic_range.h +++ b/src/include/ranges/dynamic_range.h @@ -93,9 +93,10 @@ namespace MultiArrayTools class MakeFor : public MakeForBase { private: - const Index& mI; + std::shared_ptr mI; + MakeFor() = default; public: - MakeFor(const Index& i); + MakeFor(const std::shared_ptr& i); virtual DynamicalExpression ifor(size_t step, Expr ex) const override; virtual DynamicalExpression iforh(size_t step, Expr ex) const override; @@ -304,7 +305,43 @@ namespace MultiArrayTools namespace MultiArrayTools { + /************************* + * IndexWrapperBase * + *************************/ + template + auto IndexWrapperBase::ifor(size_t step, Expr ex) + -> DynamicalExpression + { + + } + + template + auto IndexWrapperBase::iforh(size_t step, Expr ex) + -> DynamicalExpression + { + + } + + /**************** + * MakeFor * + ****************/ + + template + MakeFor::MakeFor(const Index& i) : mI(i) {} + + template + DynamicalExpression MakeFor::ifor(size_t step, Expr ex) const + { + return DynamicalExpression(std::make_shared>(mI,step,ex)); + } + + template + DynamicalExpression MakeFor::iforh(size_t step, Expr ex) const + { + return DynamicalExpression(std::make_shared>(mI,step,ex)); + } + /*********************** * DynamicRange * ***********************/