cppx-core
|
Common integer operations: is_even, is_odd, intdiv, intmod, intsquare, intcube, intmin and intmax. More...
#include <cppx-core/language/syntax/macro-use.hpp>
#include <cppx-core/language/types/Truth.hpp>
#include <c/limits.hpp>
#include <c/stdint.hpp>
#include <c/stdlib.hpp>
#include <algorithm>
#include <type_traits>
Go to the source code of this file.
Namespaces | |
cppx | |
cppx::calc | |
Functions and constants typically available on a scientific calculator, but somehow missing from the standard library. | |
Functions | |
template<class Int > | |
auto | cppx::is_even (const Int x) -> Truth |
template<class Int > | |
auto | cppx::is_odd (const Int x) -> Truth |
template<class Int > | |
auto | cppx::intdiv (const Int a, const Int b) noexcept -> Int |
auto | cppx::intmod (const int a, const int b) noexcept -> int |
template<class Int = int> | |
auto | cppx::intsquare (const Int x) -> Int |
template<class Int = int> | |
auto | cppx::intcube (const Int x) -> Int |
template<class... Ints> | |
auto | cppx::intmin (const Ints... args) -> std::common_type_t< Ints... > |
template<class... Ints> | |
auto | cppx::intmax (const Ints... args) -> std::common_type_t< Ints... > |
cppx::calc::CPPX_USE_CPPX (is_even, is_odd, intdiv, intmod, intsquare, intcube, intmin, intmax) | |