This documentation is automatically generated by competitive-verifier/competitive-verifier
#include "tools/is_arithmetic.hpp"
template <typename T>
struct is_arithmetic {
static constexpr bool value;
};
template <typename T>
inline constexpr bool is_arithmetic_v = is_arithmetic<T>::value;
tools::is_arithmetic_v<T>
is equivalent to std::is_arithmetic_v<T> || std::is_same_v<std::remove_cv_t<T>, tools::int128_t> || std::is_same_v<std::remove_cv_t<T>, tools::uint128_t>
.
When using libstdc++ with -std=c++...
option, std::is_arithmetic_v<tools::int128_t>
and std::is_arithmetic_v<tools::uint128_t>
are treated as false
, but with tools::is_arithmetic
, they can be treated as true
.
#ifndef TOOLS_IS_ARITHMETIC_HPP
#define TOOLS_IS_ARITHMETIC_HPP
#include <type_traits>
namespace tools {
template <typename T>
struct is_arithmetic : ::std::is_arithmetic<T> {};
template <typename T>
inline constexpr bool is_arithmetic_v = ::tools::is_arithmetic<T>::value;
}
#endif
#line 1 "tools/is_arithmetic.hpp"
#include <type_traits>
namespace tools {
template <typename T>
struct is_arithmetic : ::std::is_arithmetic<T> {};
template <typename T>
inline constexpr bool is_arithmetic_v = ::tools::is_arithmetic<T>::value;
}