Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3517: [iostreams] stream<file_descriptor_source> closes supplied descriptor
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-06-15 13:54:10
#3517: [iostreams] stream<file_descriptor_source> closes supplied descriptor
--------------------------------------------------------------------+-------
Reporter: Alexander Churanov <alexanderchuranov+boost@â¦> | Owner: turkanis
Type: Bugs | Status: new
Milestone: Boost 1.41.0 | Component: iostreams
Version: Boost 1.39.0 | Severity: Problem
Keywords: |
--------------------------------------------------------------------+-------
Comment(by steven_watanabe):
Replying to [comment:2 danieljames]:
> I think you're right, but I feel cautious about silently changing
existing behaviour. I also dislike the boolean parameter. So I'd create a
new constructor which takes flags to indicated if the handle should be
closed. And maybe `close_on_exit` if someone wants it. I'd deprecate the
existing constructor, so that it's only present if a macro is defined.
That way we'd break the compile rather than subtly changing the code. What
do you think of something like this?
Sounds good to me.
> Am I being over-cautious?
I don't think so.
> <snip code>
>
> It'll be more verbose but I think it's worth it to clear up the
ambiguity. Oh, and those constructors should probably have been
`explicit`.
Yep.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3517#comment:3> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:03 UTC