Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
template<typename Value>
struct Weighted
{
Value m_value;
double m_weight;
};
template<typename Value>
Weighted<Value> weighted(Value gen, double weight)
{
return Weighted<Value>{gen, weight};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment