blob: 2dc79538c7a3b3af6fb5a7b7df73a37505d5996e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#ifndef PYTHONIC_INCLUDE_BUILTIN_DIVMOD_HPP
#define PYTHONIC_INCLUDE_BUILTIN_DIVMOD_HPP
#include "pythonic/include/types/tuple.hpp"
#include "pythonic/include/utils/functor.hpp"
PYTHONIC_NS_BEGIN
namespace builtins
{
template <class T0, class T1>
auto divmod(T0 const &t0, T1 const &t1) // other types are left over
-> decltype(types::make_tuple(t0 / t1, t0 % t1));
DEFINE_FUNCTOR(pythonic::builtins, divmod);
} // namespace builtins
PYTHONIC_NS_END
#endif
|