[llvm-bugs] [Bug 43739] New: Non-constexpr swap is allowed in constexpr context

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Oct 21 00:51:48 PDT 2019


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

            Bug ID: 43739
           Summary: Non-constexpr swap is allowed in constexpr context
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++2a
          Assignee: unassignedclangbugs at nondot.org
          Reporter: zamazan4ik at tut.by
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

For the following code https://godbolt.org/z/8umUCN GCC produces compiler error
(that's correct, I think), but Clang(trunk and 9) compiles it successfully.

I think Clang shall has here a compiler error too.

Notice that Clang 8 is correct here: compilation fails.

Godbolt link: https://godbolt.org/z/8umUCN

-- 
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/20191021/c854a424/attachment.html>


More information about the llvm-bugs mailing list