2018-02-14 23:48 GMT+01:00 Miguel Ojeda via Boost
On Wed, Feb 14, 2018 at 11:06 PM, Brook Milligan
wrote: On Feb 14, 2018, at 2:18 PM, Miguel Ojeda via Boost <
boost@lists.boost.org> 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.
Thanks as well for the very quick review!
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.
I thought about that as a possible extension, but since I typically need/want to write other things (operations, logging...) in the RAII class, I wrote that way.
I actually find it a convincing argument. Now I can see why you would want to have only `unique_value`. Regards, &rzej;