[llvm-bugs] [Bug 38604] New: std::string is too eager in convertibility-to-string_view checks

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Aug 16 11:07:03 PDT 2018


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

            Bug ID: 38604
           Summary: std::string is too eager in
                    convertibility-to-string_view checks
           Product: libc++
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ldionne at apple.com
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com

Created attachment 20734
  --> https://bugs.llvm.org/attachment.cgi?id=20734&action=edit
libc++-style test case

Since https://reviews.llvm.org/D48616, we’re checking
convertibility-to-string_view in several std::string methods. However, those
new templated methods are not guarded behind C++17 checks, which means that
we’re still making those checks in C++11 and C++14. This is bad for types that
provide promiscuous conversion operators, as they can sniff that we're
providing these methods in C++11/C++14. This breaks conforming (but misbehaved)
code. I attached a test case that currently fails.

-- 
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/20180816/82231ba6/attachment-0001.html>


More information about the llvm-bugs mailing list