
9 Feb
2009
9 Feb
'09
3:36 a.m.
From: OvermindDL1 What about another optional template parameter for a default-construction value for the object (either an already instanced value, or a function/functor to build one or something)? Less hassle in many cases then, and would allow default construction of any of those that are by default not default constructable.
Right, this would be useful here. Another way to achieve this is to wrap constrained into an initialiser class that would assign some predefined value to its underlying constrained object upon default construction. Unfortunately, none of those methods is perfect and I still have hope to find a better way to do this. ;-) Best regards, Robert