[PATCH] __attribute__((enable_if)) and non-overloaded member functions

Ettore Speziale speziale.ettore at gmail.com
Tue May 26 13:20:08 PDT 2015


Hello,

the attached patch fixes the case where __attribute__((enable_if)) is sticked to a member function with no overloads. It seems that in these case clang does not execute the code about overload resolution which contains the check about __attribute__((enable_if)). Hence it would be possible to use a function protected by __attribute__((enable_if)) even if the __attribute__((enable_if)) predicate is false.

Thanks,
Ettore Speziale

-------------- next part --------------
A non-text attachment was scrubbed...
Name: enable_if.diff
Type: application/octet-stream
Size: 2188 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150526/66cca46d/attachment.obj>


More information about the cfe-commits mailing list