23 template <
typename WeightSet>
30 template <
typename WeightSet>
38 template <
typename WeightSet>
39 class weight_wrapper final:
public weight_base
44 using weight_t =
typename weightset_t::value_t;
74 using weight = std::shared_ptr<const detail::weight_base>;
76 template <
typename WeightSet>
80 const typename WeightSet::value_t& w)
82 return std::make_shared<detail::weight_wrapper<WeightSet>>(ws, w);
auto & as() const
Extract wrapped typed weight.
const weight_t weight_
The weight.
const weight_t weight() const
weight_wrapper(const weightset_t &ws, const weight_t &w)
std::shared_ptr< const detail::weight_base > weight
weight make_weight(const WeightSet &ws, const typename WeightSet::value_t &w)
boost::flyweight< std::string, boost::flyweights::no_tracking, boost::flyweights::intermodule_holder > symbol
An internalized string.
const weightset_t & weightset() const
const weightset_t weightset_
The weight set.
auto & as()
Extract wrapped typed weight.
virtual symbol vname() const override
A description of the weight type.
Aggregate a weight and its weightset.
typename weightset_t::value_t weight_t
To dyn_cast(From &&from)
A dynamic_cast in debug mode, static_cast with NDEBUG.