Commit 7f00308f authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

functor-degree wrapper corrected

parent fd417732
...@@ -336,7 +336,7 @@ namespace AMDiS ...@@ -336,7 +336,7 @@ namespace AMDiS
{ {
typedef typename result_of::Functor<F>::type result_type; typedef typename result_of::Functor<F>::type result_type;
DegreeWrapper(F&& fct_) : fct(fct_) {} DegreeWrapper(F const& fct_) : fct(fct_) {}
template <class... Int> template <class... Int>
int getDegree(Int... degrees) const { return D; } int getDegree(Int... degrees) const { return D; }
...@@ -344,7 +344,7 @@ namespace AMDiS ...@@ -344,7 +344,7 @@ namespace AMDiS
template <class... Ts> template <class... Ts>
result_type operator()(Ts&&... args) const result_type operator()(Ts&&... args) const
{ {
return fct(args...); return fct(std::forward<Ts>(args)...);
} }
protected: protected:
...@@ -357,7 +357,7 @@ namespace AMDiS ...@@ -357,7 +357,7 @@ namespace AMDiS
{ {
typedef typename result_of::Functor<F>::type result_type; typedef typename result_of::Functor<F>::type result_type;
DegreeWrapper2(F&& fct_, DegF&& degfct_) DegreeWrapper2(F const& fct_, DegF const& degfct_)
: fct(fct_), degfct(degfct_) {} : fct(fct_), degfct(degfct_) {}
template <class... Int> template <class... Int>
...@@ -369,7 +369,7 @@ namespace AMDiS ...@@ -369,7 +369,7 @@ namespace AMDiS
template <class... Ts> template <class... Ts>
result_type operator()(Ts&&... args) const result_type operator()(Ts&&... args) const
{ {
return fct(args...); return fct(std::forward<Ts>(args)...);
} }
protected: protected:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment