Boost logo

Boost :

Subject: Re: [boost] [multiindex] internal scope_guard has changed access from public to protected
From: Jeffrey Lee Hellrung, Jr. (jhellrung_at_[hidden])
Date: 2010-05-29 16:38:10


On 5/29/2010 6:58 AM, Thorsten Ottosen wrote:
> Thorsten Ottosen skrev:
>> Joaquin M Lopez Munoz skrev:
>>> Thorsten Ottosen <nesotto <at> cs.aau.dk> writes:
>
>>> Would you like to do the addition yourself and commit the
>>> changes to the trunk? I'm quite busy these days to do it
>>> myself.
>>
>> Yes, no problem.
>>
>> I'll post the code here before comitting.
>
> Attached is a patch.
[...]
> Let me know if it is good enough to be committed.
>
> regards
>
> -Thorsten

At the risk of intrusively butting in, I couldn't help but notice that
Joaquin's specification of make_obj_guard_if was described as (from
2010/05/29 3:41 AM PDT):

"I'd prefer to leave make_obj_guard
like it is and add an additional

   make_obj_guard_if<...>

(note the _if) for your use case, which creates a null_guard
if the condition is not true."

However, it appears Thorsten's implementation creates a null_guard if
the condition *is* true (the boolean is named "is_null", after all).
I'd consider Joaquin's semantics to be less confusing.

Also, since I'm here, perhaps you should have a make_obj_guard_if_c
taking the boolean template parameter, while make_obj_guard_if takes a
Boost.MPL boolean constant class. This is the convention used by
Boost.EnableIf and Boost.MPL (among other Boost libraries), right?

- Jeff


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