
31 Dec
2009
31 Dec
'09
4:57 a.m.
// How to initialize? Variable av = {}; Variable bv = {}; Variable cv = {};
Hmm, surprisingly (to me), this works: Variable av = {boost::shared_ptr<Reference>(new Reference("a"))}; Variable bv = {boost::shared_ptr<Reference>(new Reference("b"))}; Variable cv = {boost::shared_ptr<Reference>(new Reference("c"))}; How can this be static initialization when it includes a dynamic allocation? With this, the testcase compiles and runs correctly. -Dave