[llvm-bugs] [Bug 34668] New: P0704R1 implementation is too permissive

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 19 06:11:17 PDT 2017


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

            Bug ID: 34668
           Summary: P0704R1 implementation is too permissive
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rs2740 at gmail.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org

P0704R1 only permits pointers to const & member functions to be used with
rvalues (i.e., the cv-qualifier-seq must be exactly const). const volatile &
member functions aren't included, as only lvalue reference to non-volatile
const types can bind to rvalues.

Clang's current implementation only checks for the presence of const:

struct F {
    void y() const volatile &;
};

using t = decltype((F().*&F::y)());

This shouldn't compile but does on Clang trunk.

-- 
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/20170919/7ce0b7ca/attachment.html>


More information about the llvm-bugs mailing list