89 "z: div: invalid division: ", l,
'/', r);
105 raise(
"z: star: invalid value: ",
to_string(*
this, v));
192 raise(
"invalid format: ", fmt);
static bool is_one(const value_t v)
static value_t conv(self_t, value_t v)
weightset_mixin< detail::r_impl > r
static size_t hash(value_t v)
ATTRIBUTE_PURE unsigned int gcd(unsigned int a, unsigned int b)
Greatest common divisor.
static constexpr bool is_commutative()
value_t star(const value_t v) const
std::istringstream is
The input stream: the specification to translate.
static std::ostream & print(const value_t v, std::ostream &o, format={})
static value_t rgcd(const value_t l, const value_t r)
weightset_mixin< detail::b_impl > b
char eat(std::istream &is, char c)
Check lookahead character and advance.
static z make(std::istream &is)
Build from the description in is.
std::ostream & print_set(std::ostream &o, format fmt={}) const
static value_t rdiv(const value_t l, const value_t r)
auto hash_value(const T &v) -> decltype(std::hash< T >
Following the naming convention of Boost.
static value_t add(const value_t l, const value_t r)
Provide a variadic mul on top of a binary mul(), and one().
static constexpr star_status_t star_status()
static bool equal(const value_t l, const value_t r)
static value_t conv(b, b::value_t v)
static bool is_zero(const value_t v)
void require(bool b, Args &&...args)
If b is not verified, raise an error with args as message.
std::string to_string(direction d)
Conversion to string.
static value_t lgcd(const value_t l, const value_t r)
static bool less(value_t lhs, value_t rhs)
Whether lhs < rhs.
static constexpr bool is_special(value_t)
boost::flyweight< std::string, boost::flyweights::no_tracking, boost::flyweights::intermodule_holder > symbol
An internalized string.
static value_t transpose(const value_t v)
static value_t sub(const value_t l, const value_t r)
ATTRIBUTE_NORETURN void fail_reading(std::istream &is, Args &&...args)
Throw an exception after failing to read from is.
static value_t mul(const value_t l, const value_t r)
static value_t conv(std::istream &is, bool=true)
static constexpr bool show_one()
static value_t ldiv(const value_t l, const value_t r)
static constexpr bool is_idempotent()
weightset_mixin< detail::z_impl > z