Rafal Somla wrote:
> Øystein,
>
> I think it is better to test for a pipe in the open() method. One could
> want to create Output_stream instance even when the underlying pipe does
> not yet exist or is a regular file. Only when we open the stream, it is
> important that the path points at valid pipe (or no such file exists).
> This is remote possibility but why to restrict flexibility without a
> reason?
I have a reason: Reduced code complexity by not manipulating m_flags in
several locations. Why increase complexity before the flexibility is
needed?
An alternative that is OK with me, it to move all m_flags handling to
open. That is, do not set m_flags at all in the constructor.
--
Øystein
>
> Rafal
>
> Grøvlen wrote:
>> Sergey,
>>
>> I think a test for this functionality needs to be included.
>>
>> I also wonder whether it would be better to put the new code in the
>> constructor. I think putting the m_flags logic in one place instead
>> of spreading it, would make the code easier to understand.
>>