Given:
void foo(int i) __attribute__((enable_if(i < 0, ""))); void foo(double d); auto fooToCall = foo;
...We currently can't determine the type of fooToCall, so this fails to compile. This patch lets us infer fooToCall to be `void (*)(double);
Paths
| Differential D15591
[Bugfix] Make type deduction work more nicely with unaddressable functions ClosedPublic Authored by george.burgess.iv on Dec 16 2015, 2:48 PM.
Details Summary Given: void foo(int i) __attribute__((enable_if(i < 0, ""))); void foo(double d); auto fooToCall = foo; ...We currently can't determine the type of fooToCall, so this fails to compile. This patch lets us infer fooToCall to be `void (*)(double);
Diff Detail
Event Timelinegeorge.burgess.iv retitled this revision from to [Bugfix] Make type deduction work more nicely with unaddressable functions. george.burgess.iv updated this object. Comment Actions
This revision is now accepted and ready to land.Mar 18 2016, 11:23 AM Closed by commit rL263888: [Sema] Make type deduction work with some overloadable functions (authored by • gbiv). · Explain WhyMar 19 2016, 2:56 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 51120 cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp
cfe/trunk/test/SemaCXX/unaddressable-functions.cpp
|