28 Mar
2011
28 Mar
'11
5:37 p.m.
On Mon, Mar 28, 2011 at 12:24 PM, Dominique Devienne
On Sun, Mar 27, 2011 at 4:01 PM, Jan Kundrát
wrote:
It turns out that the boost::process::child class is missing a default constructor...
I don't see the lack of a default constructor as a design flaw here.
I agree. What should be the meaning of a default-constructed boost::process::child? Which of the normal invariants still hold when the object is default-constructed? It seems to me that you're asking for the 'child' class to store a flag: is this a real instance or a placeholder instance? Then every access to that object must check the flag. By factoring out the flag to boost::optional, the semantics of the boost::process::child class are improved.