17 template <
typename Derived,
typename Value>
26 return static_cast<const self_t&
>(*this);
74 return std::numeric_limits<value_t>::max();
133 conv(std::istream& is,
bool =
true)
136 if (is.peek() ==
'o')
143 else if (!(is >> res))
value_t star(const value_t v) const
static constexpr bool is_commutative()
ATTRIBUTE_NORETURN void fail_reading(std::istream &is, Args &&...args)
Throw an exception after failing to read from is.
std::ostream & str_escape(std::ostream &os, const std::string &str, const char *special=nullptr)
Output a string, escaping special characters.
ATTRIBUTE_NORETURN void raise_not_starrable(const WeightSet &ws, const typename WeightSet::value_t &w)
This value is not starrable.
static constexpr bool is_idempotent()
static bool less(value_t lhs, value_t rhs)
Whether lhs < rhs.
value_t ldivide(const value_t l, const value_t r) const
void require(Bool b, Args &&...args)
If b is not verified, raise an error with args as message.
static value_t conv(std::istream &is, bool=true)
auto hash_value(const T &v) -> decltype(std::hash< T >
Following the naming convention of Boost.
static value_t mul(const value_t l, const value_t r)
static constexpr bool is_special(value_t)
static bool equal(const value_t l, const value_t r)
static bool is_zero(const value_t v)
#define VCSN_REQUIRE(Cond,...)
A macro similar to require.
valid iff proper succeeds.
An input/output format for valuesets.
static constexpr star_status_t star_status()
static bool is_one(const value_t v)
static std::ostream & print(const value_t v, std::ostream &o=std::cout, format fmt={})
static value_t transpose(const value_t v)
static constexpr bool show_one()
static size_t hash(value_t v)
static value_t conv(b, b::value_t v)
Provide a variadic mul on top of a binary mul(), and one().
value_t rdivide(const value_t l, const value_t r) const
static value_t add(const value_t l, const value_t r)
weightset_mixin< detail::r_impl > r