[llvm-bugs] [Bug 42097] New: variant:668:1: error: the parameter for this explicitly-defaulted copy constructor is const, but a member or base requires it to be non-const

via llvm-bugs llvm-bugs at lists.llvm.org
Fri May 31 12:36:52 PDT 2019


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

            Bug ID: 42097
           Summary: variant:668:1: error: the parameter for this
                    explicitly-defaulted copy constructor is const, but a
                    member or base requires it to be non-const
           Product: libc++
           Version: 8.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: dmitry.sviridov at gmail.com
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com

See the simple example:

https://wandbox.org/permlink/ZvoFEk5D9PUd3fVX

If you add const to the line 6, it magically works. So it does if you change
standard to C++2a

-- 
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/20190531/a607432a/attachment.html>


More information about the llvm-bugs mailing list