mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-10 03:05:33 -06:00
Do not use std::pointer_to_binary_function.
Removed from C++17.
This commit is contained in:
parent
388a44f1ad
commit
83a5cf1f91
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user