llvm-project/libcxx/test/support
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
..
test.support Implement P0513R0 - "Poisoning the Hash" 2017-01-21 00:02:12 +00:00
Counter.h Remove trailing whitespace in test suite. Approved by Marshall Clow. 2016-06-01 21:35:39 +00:00
DefaultOnly.h
MoveOnly.h Add support for running our test suite against MSVC's STL 2017-01-18 01:48:54 +00:00
allocators.h Remove names of unreferenced parameters. Patch from STL@microsoft.com 2016-04-28 03:17:56 +00:00
any_helpers.h Update issue status for LWG 2744 2016-10-16 02:51:50 +00:00
archetypes.hpp [libcxx] [test] D27268: Fix MSVC x64 warning C4267 "conversion from 'size_t' to 'int' [or 'unsigned int'], possible loss of data", part 2/4. 2016-12-06 01:14:43 +00:00
archetypes.ipp Add <variant> tests but disable them for libc++ 2016-11-23 01:02:51 +00:00
asan_testing.h Remove trailing whitespace in test suite. Approved by Marshall Clow. 2016-06-01 21:35:39 +00:00
assert_checkpoint.h Add checkpoint diagnostics to help diagnose buildbot failures. 2016-07-18 03:00:09 +00:00
cmpxchg_loop.h Add missing license headers 2016-01-19 21:52:04 +00:00
constexpr_char_traits.hpp [libc++] Fix PR 31938 - std::basic_string constructors use non-deductible parameter types. 2017-02-17 01:17:10 +00:00
container_test_types.h [libcxx] [test] Fix comment typos, strip trailing whitespace. 2017-01-18 20:10:25 +00:00
controlled_allocators.hpp [libcxx] [test] Fix comment typos, strip trailing whitespace. 2017-01-18 20:10:25 +00:00
count_new.hpp Fix more uses of dynamic exception specifications in C++17 2016-12-11 02:47:36 +00:00
counting_predicates.hpp Remove trailing whitespace in test suite. Approved by Marshall Clow. 2016-06-01 21:35:39 +00:00
debug_mode_helper.h Get more std::string _LIBCPP_DEBUG tests passing 2017-01-18 05:34:42 +00:00
deleter_types.h Implement P0513R0 - "Poisoning the Hash" 2017-01-21 00:02:12 +00:00
demangle.h Fix demangle helper after r286788 2017-01-20 00:00:31 +00:00
disable_missing_braces_warning.h Get all tuple tests passing on Windows 2017-01-07 00:10:42 +00:00
experimental_any_helpers.h [libcxx] Add std::any 2016-08-11 03:13:11 +00:00
external_threads.cpp [libc++] Cleanup and document <__threading_support> 2017-01-06 20:05:40 +00:00
filesystem_dynamic_test_helper.py fix python3 syntax error 2017-02-07 21:21:17 +00:00
filesystem_test_helper.hpp [libcxx] [test] Fix comment typos, strip trailing whitespace. 2017-01-18 20:10:25 +00:00
hexfloat.h Don't use std::__clz in 'test/support/hexfloat.h'. 2016-05-03 02:04:26 +00:00
is_transparent.h [libcxx] [test] Replace _LIBCPP_STD_VER with TEST_STD_VER. 2016-11-04 20:26:59 +00:00
min_allocator.h Implement P0513R0 - "Poisoning the Hash" 2017-01-21 00:02:12 +00:00
msvc_stdlib_force_include.hpp [libcxx] [test] Fix Clang -Wdeprecated-declarations with MSVC's CRT. 2017-02-05 22:48:02 +00:00
nasty_containers.hpp Fix unused parameters and variables 2016-12-23 23:37:52 +00:00
nasty_macros.hpp Replace identifiers called `__out` because Windows.h #defines it. 2017-01-07 11:27:06 +00:00
nothing_to_do.pass.cpp test commit 2014-07-24 18:41:56 +00:00
platform_support.h [libcxx] [test] Fix comment typos, strip trailing whitespace. 2017-01-18 20:10:25 +00:00
poisoned_hash_helper.hpp Fix recent build errors 2017-01-21 00:57:29 +00:00
private_constructor.hpp
propagate_const_helpers.h Implement std::experimental::propagate_const from LFTS v2 2016-06-19 19:34:13 +00:00
rapid-cxx-test.hpp Add Filesystem TS -- Complete 2016-06-17 19:46:40 +00:00
set_windows_crt_report_mode.h [libc++][CMake] Use debug MSVC runtimes when libc++ is built in debug mode 2017-01-14 07:54:39 +00:00
test_allocator.h Fix undefined behavior in container swap tests. 2016-12-11 03:41:12 +00:00
test_convertible.hpp Add Filesystem TS -- Complete 2016-06-17 19:46:40 +00:00
test_iterators.h Replace _LIBCPP_HAS_NO_DELETED_FUNCTIONS with _LIBCPP_CXX03_LANG 2017-01-06 20:58:25 +00:00
test_macros.h Prevent UBSAN from generating unsigned overflow diagnostics in the hashing internals 2017-02-08 00:10:10 +00:00
test_memory_resource.hpp [libcxx] [test] Fix comment typos, strip trailing whitespace. 2017-01-18 20:10:25 +00:00
tracked_value.h Add missing license headers 2016-01-19 21:52:04 +00:00
type_id.h Refactor uses_allocator test types for upcoming fixes 2016-12-09 09:51:09 +00:00
user_defined_integral.hpp Add missing license headers 2016-01-19 21:52:04 +00:00
uses_alloc_types.hpp Fix unused parameters and variables 2016-12-23 23:37:52 +00:00
variant_test_helpers.hpp Add <variant> tests but disable them for libc++ 2016-11-23 01:02:51 +00:00