Go to file
Eric Fiselier dd3ba794ef [libc++] Fix PR 31938 - std::basic_string constructors use non-deductible parameter types.
Summary:
This patch fixes http://llvm.org/PR31938. The description below is copy/pasted from the bug:

The standard says:

template<class charT, class traits = char_traits<charT>,
         class Allocator = allocator<charT>>
class basic_string {
  using value_type = typename traits::char_type;
  // ...
  basic_string(const charT* s, const Allocator& a = Allocator());
};

libc++ actually chooses to declare the constructor as

  basic_string(const value_type* s, const Allocator& a = Allocator());

The implicit deduction guides from class template argument deduction make what was previously an implementation detail visible:

std::basic_string s = "foo"; // error, can't deduce charT.

The constructor in question is in the libc++ DSO, but fortunately it looks like fixing this will not result in an ABI break.


@rsmith How does this look? I did more than just the constructors mentioned in the PR, but IDK how far to take it.


Reviewers: mclow.lists, rsmith

Reviewed By: rsmith

Subscribers: cfe-commits, rsmith

Differential Revision: https://reviews.llvm.org/D29863

llvm-svn: 295393
2017-02-17 01:17:10 +00:00
clang [ubsan] Reduce null checking of C++ object pointers (PR27581) 2017-02-17 01:05:42 +00:00
clang-tools-extra Fix clang-move test after clang-format update r295312 2017-02-16 13:17:38 +00:00
compiler-rt [PGO] Suspend SIGKILL for PR_SET_PDEATHSIG in profile-write 2017-02-16 19:21:31 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Move BufferPtr into the block where it it being used 2017-02-12 21:33:49 +00:00
libcxx [libc++] Fix PR 31938 - std::basic_string constructors use non-deductible parameter types. 2017-02-17 01:17:10 +00:00
libcxxabi Fix couple of test failures when using the LIBCXXABI_SILENT_TERMINATE mode. 2017-02-15 13:43:05 +00:00
libunwind [libunwind][CMake] Use libc++ headers when available 2017-02-16 05:18:08 +00:00
lld Add a comment. 2017-02-17 00:40:44 +00:00
lldb Fix build 2017-02-16 20:15:26 +00:00
llgo [llgo] Remove support for LLVM attributes 2016-12-06 19:22:04 +00:00
llvm [CMake] Add variable IOS to iOS toolchain 2017-02-17 01:11:41 +00:00
openmp Run-time library part of OpenMP 5.0 task reduction implementation. 2017-02-16 17:49:49 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly [ScopInfo] Rename MaxDisjunctions -> MaxDisjuncts [NFC] 2017-02-16 19:11:33 +00:00