|
Boost : |
From: Jaakko Jarvi (jajarvi_at_[hidden])
Date: 2003-10-10 11:49:07
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.
Jaakko & Jeremiah
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk