patch: new attribute enable_if

Chandler Carruth chandlerc at google.com
Sun Sep 22 14:13:00 PDT 2013


On Sun, Sep 22, 2013 at 3:24 AM, Nick Lewycky <nicholas at mxc.ca> wrote:

> The attached patch adds a new attribute named "enable_if" which takes an
> expression and a string. At the call site, the arguments are substituted
> into the enable_if expression (which is written in terms of the parameters)
> to determine whether this function is a viable candidate.
>

What's the motivation? The C++ committee looked at just such a construct
and currently is leaning in a different direction (concepts lite) so it
seems odd to add this as an extension to Clang at this point.


>
> Please review!
>
> Nick
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130922/909e29c3/attachment.html>


More information about the cfe-commits mailing list