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);
virtual symbol vname() const override
A description of the weight type.
Aggregate a weight and its weightset.
std::shared_ptr< const detail::weight_base > weight
weight_wrapper(const weightset_t &ws, const weight_t &w)
auto & as()
Extract wrapped typed weight.
weight make_weight(const WeightSet &ws, const typename WeightSet::value_t &w)
const weight_t weight() const
typename weightset_t::value_t weight_t
const weightset_t weightset_
The weight set.
To dyn_cast(From &&from)
A dynamic_cast in debug mode, static_cast with NDEBUG.
boost::flyweight< std::string, boost::flyweights::no_tracking, boost::flyweights::intermodule_holder > symbol
An internalized string.
auto & as() const
Extract wrapped typed weight.
const weight_t weight_
The weight.
const weightset_t & weightset() const