#ifndef PYTHONIC_OPERATOR_IMAX_HPP #define PYTHONIC_OPERATOR_IMAX_HPP #include "pythonic/include/operator_/imax.hpp" #include "pythonic/utils/functor.hpp" #include "pythonic/numpy/maximum.hpp" PYTHONIC_NS_BEGIN namespace operator_ { template auto imax(A &&a, B &&b) -> typename std::enable_if< std::is_const::value || !std::is_assignable::value, decltype(numpy::functor::maximum{}(std::forward(a), std::forward(b)))>::type { return numpy::functor::maximum{}(std::forward(a), std::forward(b)); } template auto imax(A &&a, B &&b) -> typename std::enable_if< !std::is_const::value && std::is_assignable::value, decltype(a = numpy::functor::maximum{}(std::forward(a), std::forward(b)))>::type { return a = numpy::functor::maximum{}(a, std::forward(b)); } } PYTHONIC_NS_END #endif