ldionne / dyno

Runtime polymorphism done right
Boost Software License 1.0
971 stars 42 forks source link

make dyno::non_owning_storage the default #49

Closed jwaterloo closed 6 years ago

jwaterloo commented 6 years ago

dyno::non_owning_storage should be the default for the following reasons additional heap allocations are not being encourage which goes contrary to the manifesto of the dyno library It matches the value based semantics expected from those working with function pointers. It makes sense for all the reasons being proposed in the function_ref proposal. http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0792r0.html function_ref is the missing link and logical development of C function pointers dyno just increases the arity of function to greater than 1

ldionne commented 6 years ago

dyno::non_owning_storage is actually a special case which does not have value semantics. For this reason, I think it does not make sense to make it the default.