diff --git a/Modules/Core/Functor/include/otbFunctorImageFilter.h b/Modules/Core/Functor/include/otbFunctorImageFilter.h index 7aeb4e7efc3f9ae35d00bb1eb2c3151f5f3d0640..8df52febc3a54917bcbf9424153d13b739e0cad2 100644 --- a/Modules/Core/Functor/include/otbFunctorImageFilter.h +++ b/Modules/Core/Functor/include/otbFunctorImageFilter.h @@ -174,7 +174,7 @@ template <class T> struct ImageTypeDeduction<itk::VariableLengthVector<T>> */ -template <typename T, typename TNameMap> struct FunctorFilterSuperclassHelper : public FunctorFilterSuperclassHelper<decltype(&T::operator()),TNameMap> {}; +template <typename T, typename TNameMap> struct FunctorFilterSuperclassHelper : public FunctorFilterSuperclassHelper<decltype(&std::remove_reference<T>::type::operator()),TNameMap> {}; namespace functor_filter_details { diff --git a/Modules/Core/Functor/include/otbFunctorImageFilter.hxx b/Modules/Core/Functor/include/otbFunctorImageFilter.hxx index 42a93c2f2eb420075a5e7b989366ab5ea94ea936..47bba7bbab88e6e38d152c8fd9755b150e3339b9 100644 --- a/Modules/Core/Functor/include/otbFunctorImageFilter.hxx +++ b/Modules/Core/Functor/include/otbFunctorImageFilter.hxx @@ -141,7 +141,7 @@ template <typename T> struct GetProxy<itk::ConstNeighborhoodIterator<T> > } }; -template <class Oper> struct OperProxy : public OperProxy<decltype(&Oper::operator())> {}; +template <class Oper> struct OperProxy : public OperProxy<decltype(&std::remove_reference<Oper>::type::operator())> {}; template<class Out, class ... In> struct OperProxy<Out(*)(In...)> {