35 template <
typename Tag>
42 template <
typename ValueSet>
43 value_impl(
const ValueSet& vs,
const typename ValueSet::value_t&
v)
44 : self_{std::make_shared<model<ValueSet>>(vs,
v)}
50 return self_->vname();
54 template <
typename ValueSet>
61 template <
typename ValueSet>
62 const auto&
as()
const 90 self_ = std::move(l.
self_);
98 virtual ~
base() =
default;
103 template <
typename ValueSet>
109 : valueset_(
std::move(vs))
110 , value_(
std::move(v))
115 return valueset().sname();
136 std::shared_ptr<base> self_ =
nullptr;
141 template <
typename ValueSetLhs,
typename ValueSetRhs,
typename Tag>
145 const auto& l = lhs->template as<ValueSetLhs>();
146 const auto&
r = rhs->template as<ValueSetRhs>();
147 auto rs =
join(l.valueset(), r.valueset());
148 auto lr = rs.conv(l.valueset(), l.value());
149 auto rr = rs.conv(r.valueset(), r.value());
150 return std::make_tuple(rs, lr , rr);
Abstract wrapped typed Value/ValueSet.
Tag for polynomial/polynomialset.
std::shared_ptr< base > self_
The wrapped value/valueset.
const value_t value_
The value.
value_impl()
Default construction: empty.
auto & operator=(std::nullptr_t)
const valueset_t & valueset() const
auto & as()
Extract wrapped typed value.
const valueset_t valueset_
The value set.
context join(const context &c1, const context &c2)
Bridge.
boost::flyweight< std::string, boost::flyweights::no_tracking, boost::flyweights::intermodule_holder > symbol
An internalized string.
const auto & as() const
Extract wrapped typed value.
symbol vname() const override
model(valueset_t vs, value_t v)
A wrapped typed Value/ValueSet.
Provide a variadic mul on top of a binary mul(), and one().
To dyn_cast(From &&from)
A dynamic_cast in debug mode, static_cast with NDEBUG.
Tag for expansion/expansionset.
symbol vname() const
A description of the value type.
typename valueset_t::value_t value_t
value_impl * operator->()
auto & operator=(const value_impl &l)
value_impl(const ValueSet &vs, const typename ValueSet::value_t &v)
Tag for weight/weightset.
Tag for expression/expressionset.
const value_t value() const
const value_impl * operator->() const