http://llvm.org/bugs/show_bug.cgi?id=15861
Bug ID: 15861
Summary: INVOKE ambiguously implemented (result_of and
__invoke)
Product: libc++
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
The following example doesn't compile because of the ambiguous overloads of
`__invoke`:
#include <type_traits>
struct wat { wat& operator*() { return *this; } void foo(); };
int main(){
using type = std::result_of<decltype(&wat::foo)(wat)>::type;
}
The standard (indirectly) states in 20.8.1 [func.require] p1 that the second
bullet only applies if the first bullet does not, through the restrictions on
the type of `t1`. The same problem appears with member data pointers (bullets 3
and 4).
One possible resolution is to remove the respective overloads from overload
resolution depending on whether the type of `t1` is a type derived from the
class of the member pointer.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs