Boost logo

Boost Users :

Subject: Re: [Boost-users] Issues with boost::process from the sandbox and the boost::process::child semantics
From: Nat Linden (nat_at_[hidden])
Date: 2011-03-28 13:37:40


On Mon, Mar 28, 2011 at 12:24 PM, Dominique Devienne
<ddevienne_at_[hidden]> wrote:

> On Sun, Mar 27, 2011 at 4:01 PM, Jan Kundrát <jkt_at_[hidden]> 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.


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