Boost logo

Boost :

Subject: Re: [boost] File Handle and FILE* wrappers?
From: Rob Stewart (robertstewart_at_[hidden])
Date: 2014-11-29 13:03:33


On November 29, 2014 9:14:50 AM EST, Olaf van der Spek <ml_at_[hidden]> wrote:
>On Wed, Nov 26, 2014 at 10:21 PM, Rob Stewart
><robertstewart_at_[hidden]> wrote:
>>>I do, from time to time. But I always found RAII wrappers sufficient
>>>and used
>>>the native API to work with file descriptors. I usually need
>something
>>>low-level or non-portable anyway when I do
>>> this.
>>
>> I use filesystem or IOStreams when I want portability, and otherwise
>use RAII and native APIs when the code isn't portable.
>
>What RAII wrappers do you use in those cases?

In some cases, just my scope_guard class to invoke close(), for example, at end-of-scope. In other cases, I have wrappers around native handles to permit testing them and, of course, closing them.

___
Rob

(Sent from my portable computation engine)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk