$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
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