Do not use std::pointer_to_binary_function.

Removed from C++17.
This commit is contained in:
Atgeirr Flø Rasmussen 2020-02-13 11:03:05 +01:00
parent 388a44f1ad
commit 83a5cf1f91

View File

@ -580,12 +580,17 @@ private:
/// ///
/// To be used with ParallelISTLInformation::computeReduction. /// To be used with ParallelISTLInformation::computeReduction.
template<class T> template<class T>
MaskToMinOperator<std::pointer_to_binary_function<const T&,const T&,const T&> > auto makeGlobalMaxFunctor()
makeGlobalMaxFunctor()
{ {
return MaskToMinOperator<std::pointer_to_binary_function<const T&,const T&,const T&> > struct MaxOp
(std::pointer_to_binary_function<const T&,const T&,const T&> {
((const T&(*)(const T&, const T&))std::max<T>)); using result_type = T;
const T& operator()(const T& t1, const T& t2)
{
return std::max(t1, t2);
}
};
return MaskToMinOperator(MaxOp());
} }
namespace detail namespace detail
@ -630,12 +635,18 @@ private:
/// ///
/// To be used with ParallelISTLInformation::computeReduction. /// To be used with ParallelISTLInformation::computeReduction.
template<class T> template<class T>
MaskToMaxOperator<std::pointer_to_binary_function<const T&,const T&,const T&> > auto
makeGlobalMinFunctor() makeGlobalMinFunctor()
{ {
return MaskToMaxOperator<std::pointer_to_binary_function<const T&,const T&,const T&> > struct MinOp
(std::pointer_to_binary_function<const T&,const T&,const T&> {
((const T&(*)(const T&, const T&))std::min<T>)); using result_type = T;
const T& operator()(const T& t1, const T& t2)
{
return std::min(t1, t2);
}
};
return MaskToMaxOperator(MinOp());
} }
template<class T> template<class T>
InnerProductFunctor<T> InnerProductFunctor<T>