|
Boost Users : |
Subject: Re: [Boost-users] Proto Help
From: David A. Greene (greened_at_[hidden])
Date: 2009-12-30 23:57:41
> // 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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net