[llvm-bugs] [Bug 51399] New: Failed to compile expression with constant operator=()

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Aug 7 07:08:40 PDT 2021


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

            Bug ID: 51399
           Summary: Failed to compile expression with constant operator=()
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++17
          Assignee: unassignedclangbugs at nondot.org
          Reporter: denismikhaylov38 at gmail.com
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

The following simple code that works on gcc(and msvc too) will not compile with
clang:
https://godbolt.org/z/zE54xa1rP

What's interesting:
1. This works good when i replace operator= to operator+ or some other operator
2. This also works good when i wrap expression name="degrees" into parentheses,
for example:
   field_t<(name="degrees")> degrees;

-- 
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/20210807/008bc3df/attachment.html>


More information about the llvm-bugs mailing list