[llvm-bugs] [Bug 35971] New: Compilation error when casting an explicit template argument which is a member-function

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jan 16 08:33:29 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=35971

            Bug ID: 35971
           Summary: Compilation error when casting an explicit template
                    argument which is a member-function
           Product: clang
           Version: 3.8
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: bstanimirov6 at gmail.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org

Casting an explicit template argument which is a member-function leads to error
on all versions of clang. 

Live demo here: https://godbolt.org/g/9Xynvm

Curiously this compiles with clang 5.0 and newer and -std=c++17 (but not with
c++14 or 11)

This makes it impossible to pass a pointer to a member function of a parent
class from the point of view of a child class. Live demo here
https://godbolt.org/g/uenNSm (This doesn't even work with -std=c++17)

Both examples compile fine on gcc and msvc

-- 
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/20180116/62aeb7c6/attachment.html>


More information about the llvm-bugs mailing list