
On Mon, 06 Sep 2010 03:07:26 +0200, Stewart, Robert <Robert.Stewart@sig.com> wrote:
[...]
* this signature: std::pair<handle, handle> (bool). Shall we use std::pair<handle, handle> to return two handles for the child and parent process or a struct with member variables called parent_end and child_end?
A child naturally ensues from a parent, so the order parent then child is easily remembered, though there is no harm in creating a struct that makes the members explicit.
Well, as stream behaviors are all about creating child processes I decided to store the child's handle in the "first" member variable of std::pair. So much about what people think is natural. :)
Shall we use a bool to indicate whether an input or output stream is configured or something else like an enumeration? I think it all depends on how many developers want to define new stream behaviors and if it's worth to make the signature a bit more self-explanatory?
bool is never a good idea for such arguments, regardless of the possibility of extending the set.
It smells a bit like over-engineering to me but then I don't really mind to change it. More opinions? Boris