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

            Bug ID: 43004
           Summary: Variant constructors forbid narrowing conversions
           Product: libc++
           Version: 9.0
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangb...@nondot.org
          Reporter: david.tr...@arm.com
                CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com

Created attachment 22377
  --> https://bugs.llvm.org/attachment.cgi?id=22377&action=edit
Narrowing conversion in variant constructor doesn't compile

I've attached a very simple file that builds with libc++ 8 and libstdc++ but
fails to build with libc++ 9. I've narrowed the change down to this commit
implementing P0608R3: https://reviews.llvm.org/D44865.
It appears that the paper forbids all narrowing conversions when constructing a
variant, is my understanding of that correct? If so it seems that this changes
behaviour in a way that breaks backwards compatibility even for code that isn't
defective and is valid C++17.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to