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