This has lots of advantages, including the fact that new Distributions no longer need to touch relation_variant.*
In general, I think it is a code smell for a class to be templated over a type that doesn't appear in its methods (ValueType appears in Relation's methods, but DistributionType doesn't .)
Plus fixed some memory leaks.
Plus added a typename_playground that makes it easier to iteratively write decltype and typename code and figure out what is going wrong.
This has lots of advantages, including the fact that new Distributions no longer need to touch relation_variant.* In general, I think it is a code smell for a class to be templated over a type that doesn't appear in its methods (ValueType appears in Relation's methods, but DistributionType doesn't .)
Plus fixed some memory leaks.
Plus added a typename_playground that makes it easier to iteratively write decltype and typename code and figure out what is going wrong.