[LLVMbugs] [Bug 15861] New: INVOKE ambiguously implemented (result_of and __invoke)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Apr 28 04:54:29 PDT 2013


            Bug ID: 15861
           Summary: INVOKE ambiguously implemented (result_of and
           Product: libc++
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: hhinnant at apple.com
          Reporter: hivemaster at hotmail.de
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The following example doesn't compile because of the ambiguous overloads of

#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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130428/cb7016eb/attachment.html>

More information about the llvm-bugs mailing list