[llvm-bugs] [Bug 41989] New: C++2a: unable to default the three-way comparison operator

via llvm-bugs llvm-bugs at lists.llvm.org
Thu May 23 01:41:02 PDT 2019


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

            Bug ID: 41989
           Summary: C++2a: unable to default the three-way comparison
                    operator
           Product: clang
           Version: 8.0
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++2a
          Assignee: unassignedclangbugs at nondot.org
          Reporter: development at jordi.vilar.cat
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

The following code, compiled with clang-8 -std=c++2a, fails with:
  error: only special member functions may be defaulted

#include <compare>

struct type
{
    friend constexpr std::strong_equality operator<=>(const type&, const type&)
noexcept = default;
};

-- 
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/20190523/2df3dab3/attachment.html>


More information about the llvm-bugs mailing list