Boost logo

Boost :

Subject: Re: [boost] [RFC] unique_val (handles, IDs, descriptors...)
From: Brook Milligan (brook_at_[hidden])
Date: 2018-02-14 22:06:18


> On Feb 14, 2018, at 2:18 PM, Miguel Ojeda via Boost <boost_at_[hidden]> wrote:
>
> If you have the time, please take a look (specially to the Rationale)
> and let me know your comments. The code itself is very short and
> straightforward.

A quick look suggests that this is useful.

However, why not have the unique_val class _be_ the RAII class? Couldn't this be done with extra template arguments (or just one) giving construction/destruction policies? You have perfect forwarding so constructor arguments can be forwarded to the policy. Would this not give you the Foo class for free? Just wondering.

Cheers,
Brook


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