[llvm-bugs] [Bug 50263] New: Default comparison is not a use of private field

via llvm-bugs llvm-bugs at lists.llvm.org
Fri May 7 08:20:57 PDT 2021


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

            Bug ID: 50263
           Summary: Default comparison is not a use of private field
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++2a
          Assignee: unassignedclangbugs at nondot.org
          Reporter: lauri at vasama.org
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

class S
{
    int x; // error: private field 'x' is not used

public:
    S(int x)
        : x(x)
    {
    }

    // default comparison uses all private fields
    bool operator==(const S&) const = default;
};

https://godbolt.org/z/1qGzMfPoe

-- 
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/20210507/cf39b048/attachment-0001.html>


More information about the llvm-bugs mailing list