llvm-project/libcxx/test/std/containers/sequences/forwardlist
Konstantin Varlamov 7da4ee6f23 [libcxx][NFC] Make sequence containers slightly more SFINAE-friendly during CTAD.
Disable the constructors taking `(size_type, const value_type&,
allocator_type)` if `allocator_type` is not a valid allocator.
Otherwise, these constructors are considered when resolving e.g.
`(int*, int*, NotAnAllocator())`, leading to a hard error during
instantiation. A hard error makes the Standard's requirement to not
consider deduction guides of the form `(Iterator, Iterator,
BadAllocator)` during overload resolution essentially non-functional.

The previous approach was to SFINAE away `allocator_traits`. This patch
SFINAEs away the specific constructors instead, for consistency with
`basic_string` -- see [LWG3076](wg21.link/lwg3076) which describes
a very similar problem for strings (note, however, that unlike LWG3076,
no valid constructor call is affected by the bad instantiation).

Differential Revision: https://reviews.llvm.org/D114311
2021-12-01 11:56:51 -08:00
..
forwardlist.access Add include for 'test_macros.h' to all the tests that were missing them. Thanks to Zoe for the (big, but simple) patch. NFC intended. 2019-05-31 18:35:30 +00:00
forwardlist.cons [libcxx][NFC] Make sequence containers slightly more SFINAE-friendly during CTAD. 2021-12-01 11:56:51 -08:00
forwardlist.erasure [libc++] Remove the c++98 Lit feature from the test suite 2020-06-03 09:37:22 -04:00
forwardlist.iter [libc++] Remove Lit annotations for unsupported GCC versions from the test suite 2021-08-12 13:30:47 -04:00
forwardlist.modifiers [libcxx][nfc] prefixes test type `input_iterator` with `cpp17_` 2021-05-02 05:02:59 +00:00
forwardlist.ops [libc++] Use addressof in forward_list. 2021-11-11 18:47:15 +01:00
forwardlist.spec [libcxx][NFC] Make sequence containers slightly more SFINAE-friendly during CTAD. 2021-12-01 11:56:51 -08:00
allocator_mismatch.compile.fail.cpp [libc++] Remove workaround for .fail.cpp tests that don't have clang-verify markup 2020-04-15 10:53:37 -04:00
empty.pass.cpp
empty.verify.cpp [libc++] Remove "// -*- C++ -*-" comments from all .cpp files. NFCI. 2021-10-01 12:06:59 -04:00
get_allocator.pass.cpp [libcxx][test][NFC] Extend get_allocator() testing for containers 2021-12-01 16:15:19 +03:00
incomplete.pass.cpp
max_size.pass.cpp
range_concept_conformance.compile.pass.cpp [libc++][NFC] Replace uses of stdr:: by just std::ranges:: 2021-09-02 13:02:12 -04:00
types.pass.cpp Add include for 'test_macros.h' to all the tests that were missing them. Thanks to Zoe for the (big, but simple) patch. NFC intended. 2019-05-31 18:35:30 +00:00