Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2003-10-10 13:19:41

Jaakko Jarvi <jajarvi_at_[hidden]> writes:

> In our last exciting episode David Abrahams wrote:
>> > 1. lazy_enable_if
>> >
>> > Shouldn't be this named apply_enable_if. It very similar to the appropriate
>> > MPL concept and seems logical to be named the same.
>> I had the same thought, FWIW. I just couldn't make it sound right in
>> the ear, though.
>> On second thought, I wonder if we need it at all. Isn't
>> mpl::apply_if<condition, nullary_metafunction, disabled>::type
>> equivalent, where disabled is a struct with no nested ::type?
> This wouldn't work. At the outermost level (apply_if), ::type always
> exists, so this would lead to an error, not disabling the function, on
> compilers (e.g. g++) where SFINAE is not applied when the invalid type
> occurs nested in another instantiation.

Well, *if* the name changes, I guess I'd vote for "enable_if_apply",
but I'm not convinced it should change.

Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at