gcc/libstdc++-v3/testsuite/20_util
Jonathan Wakely 86fc6ec9f3 Implement LWG 2905 changes to constrain unique_ptr constructors
LWG DR 2905 says that is_constructible_v<unique_ptr<P, D>, P, D const &>
should be false when D is not copy constructible. This commit implements
the changes from the DR and simplifies the signatures as per
https://github.com/cplusplus/draft/issues/1530

	* include/bits/unique_ptr.h (__uniq_ptr_impl): Add assertions to
	check deleter type.
	(unique_ptr::unique_ptr(pointer, const deleter_type&)): Add copy
	constructible constraint.
	(unique_ptr::unique_ptr(pointer, deleter_type&&)): Disable for
	deleters of reference type and add move constructible constraint.
	(unique_ptr::unique_ptr(pointer, remove_reference_t<deleter_type>&&)):
	Disable for deleters of non-reference type. Define as deleted.
	(unique_ptr<T[], D>): Likewise.
	* testsuite/20_util/unique_ptr/assign/48635_neg.cc: Replace dg-error
	directives with unstable line numbers with dg-prune-output.
	* testsuite/20_util/unique_ptr/cons/cv_qual_neg.cc: Likewise.
	* testsuite/20_util/unique_ptr/cons/lwg2905.cc: New test.
	* testsuite/20_util/unique_ptr/specialized_algorithms/swap_cxx17.cc:
	Make deleter types invocable.

From-SVN: r264206
2018-09-11 11:55:49 +01:00
..
add_const Update copyright years. 2018-01-03 11:03:58 +01:00
add_cv Update copyright years. 2018-01-03 11:03:58 +01:00
add_lvalue_reference Update copyright years. 2018-01-03 11:03:58 +01:00
add_pointer Update copyright years. 2018-01-03 11:03:58 +01:00
add_rvalue_reference Add whitespace to some dejagnu directives in libstdc++ tests 2018-06-29 10:54:07 +01:00
add_volatile Update copyright years. 2018-01-03 11:03:58 +01:00
addressof Update copyright years. 2018-01-03 11:03:58 +01:00
align Remove dg-require-cstdint directive from tests 2018-07-26 15:02:26 +01:00
aligned_storage Update copyright years. 2018-01-03 11:03:58 +01:00
aligned_union Update copyright years. 2018-01-03 11:03:58 +01:00
alignment_of Update copyright years. 2018-01-03 11:03:58 +01:00
allocator Add missing dg-require-cstdint directives to tests 2018-07-26 15:03:28 +01:00
allocator_traits Update copyright years. 2018-01-03 11:03:58 +01:00
any Add missing dg-require-cstdint directives to tests 2018-07-26 15:03:28 +01:00
as_const Update copyright years. 2018-01-03 11:03:58 +01:00
auto_ptr Update copyright years. 2018-01-03 11:03:58 +01:00
bad_function_call Update copyright years. 2018-01-03 11:03:58 +01:00
bind Update copyright years. 2018-01-03 11:03:58 +01:00
bool_constant Update copyright years. 2018-01-03 11:03:58 +01:00
common_type/requirements Update copyright years. 2018-01-03 11:03:58 +01:00
conditional/requirements Update copyright years. 2018-01-03 11:03:58 +01:00
decay/requirements Update copyright years. 2018-01-03 11:03:58 +01:00
declval/requirements Update copyright years. 2018-01-03 11:03:58 +01:00
default_delete Update copyright years. 2018-01-03 11:03:58 +01:00
duration Remove dg-require-cstdint directive from tests 2018-07-26 15:02:26 +01:00
duration_cast Update copyright years. 2018-01-03 11:03:58 +01:00
enable_if/requirements Update copyright years. 2018-01-03 11:03:58 +01:00
enable_shared_from_this Update copyright years. 2018-01-03 11:03:58 +01:00
endian Update copyright years. 2018-01-03 11:03:58 +01:00
exchange Update copyright years. 2018-01-03 11:03:58 +01:00
extent Update copyright years. 2018-01-03 11:03:58 +01:00
forward Update copyright years. 2018-01-03 11:03:58 +01:00
from_chars Update copyright years. 2018-01-03 11:03:58 +01:00
function Make std::function tolerate semantically non-CopyConstructible objects 2018-05-09 14:28:11 +01:00
function_objects PR libstdc++/85040 fix std::less<void> etc. ambiguities 2018-03-22 14:23:27 +00:00
has_unique_object_representations PR libstdc++/83830 Define std::has_unique_object_representations_v 2018-01-15 15:02:01 +00:00
has_virtual_destructor Update copyright years. 2018-01-03 11:03:58 +01:00
hash Fix some libstdc++ testsuite failures 2018-03-21 12:32:14 +00:00
headers Update copyright years. 2018-01-03 11:03:58 +01:00
in_place Update copyright years. 2018-01-03 11:03:58 +01:00
integer_sequence Update copyright years. 2018-01-03 11:03:58 +01:00
integral_constant Update copyright years. 2018-01-03 11:03:58 +01:00
is_abstract Update copyright years. 2018-01-03 11:03:58 +01:00
is_aggregate Update copyright years. 2018-01-03 11:03:58 +01:00
is_arithmetic Update copyright years. 2018-01-03 11:03:58 +01:00
is_array Update copyright years. 2018-01-03 11:03:58 +01:00
is_assignable Update copyright years. 2018-01-03 11:03:58 +01:00
is_base_of Update copyright years. 2018-01-03 11:03:58 +01:00
is_class Update copyright years. 2018-01-03 11:03:58 +01:00
is_compound Update copyright years. 2018-01-03 11:03:58 +01:00
is_const Update copyright years. 2018-01-03 11:03:58 +01:00
is_constructible Update copyright years. 2018-01-03 11:03:58 +01:00
is_convertible Update copyright years. 2018-01-03 11:03:58 +01:00
is_copy_assignable Update copyright years. 2018-01-03 11:03:58 +01:00
is_copy_constructible Update copyright years. 2018-01-03 11:03:58 +01:00
is_default_constructible Update copyright years. 2018-01-03 11:03:58 +01:00
is_destructible Update copyright years. 2018-01-03 11:03:58 +01:00
is_empty Update copyright years. 2018-01-03 11:03:58 +01:00
is_enum Update copyright years. 2018-01-03 11:03:58 +01:00
is_final Update copyright years. 2018-01-03 11:03:58 +01:00
is_floating_point Update copyright years. 2018-01-03 11:03:58 +01:00
is_function Update copyright years. 2018-01-03 11:03:58 +01:00
is_fundamental Update copyright years. 2018-01-03 11:03:58 +01:00
is_implicitly_default_constructible Update copyright years. 2018-01-03 11:03:58 +01:00
is_integral Update copyright years. 2018-01-03 11:03:58 +01:00
is_invocable Update copyright years. 2018-01-03 11:03:58 +01:00
is_literal_type Update copyright years. 2018-01-03 11:03:58 +01:00
is_lvalue_reference Update copyright years. 2018-01-03 11:03:58 +01:00
is_member_function_pointer Update copyright years. 2018-01-03 11:03:58 +01:00
is_member_object_pointer Update copyright years. 2018-01-03 11:03:58 +01:00
is_member_pointer Update copyright years. 2018-01-03 11:03:58 +01:00
is_move_assignable Update copyright years. 2018-01-03 11:03:58 +01:00
is_move_constructible Update copyright years. 2018-01-03 11:03:58 +01:00
is_nothrow_assignable Update copyright years. 2018-01-03 11:03:58 +01:00
is_nothrow_constructible Update copyright years. 2018-01-03 11:03:58 +01:00
is_nothrow_convertible P0758R1 Implicit conversion traits 2018-07-02 23:09:25 +01:00
is_nothrow_copy_assignable Update copyright years. 2018-01-03 11:03:58 +01:00
is_nothrow_copy_constructible Update copyright years. 2018-01-03 11:03:58 +01:00
is_nothrow_default_constructible Update copyright years. 2018-01-03 11:03:58 +01:00
is_nothrow_destructible Update copyright years. 2018-01-03 11:03:58 +01:00
is_nothrow_invocable Update copyright years. 2018-01-03 11:03:58 +01:00
is_nothrow_move_assignable Update copyright years. 2018-01-03 11:03:58 +01:00
is_nothrow_move_constructible Update copyright years. 2018-01-03 11:03:58 +01:00
is_nothrow_swappable Update copyright years. 2018-01-03 11:03:58 +01:00
is_nothrow_swappable_with Update copyright years. 2018-01-03 11:03:58 +01:00
is_null_pointer Update copyright years. 2018-01-03 11:03:58 +01:00
is_object Update copyright years. 2018-01-03 11:03:58 +01:00
is_pod Update copyright years. 2018-01-03 11:03:58 +01:00
is_pointer Update copyright years. 2018-01-03 11:03:58 +01:00
is_polymorphic Update copyright years. 2018-01-03 11:03:58 +01:00
is_reference Update copyright years. 2018-01-03 11:03:58 +01:00
is_rvalue_reference Update copyright years. 2018-01-03 11:03:58 +01:00
is_same Update copyright years. 2018-01-03 11:03:58 +01:00
is_scalar Update copyright years. 2018-01-03 11:03:58 +01:00
is_signed Update copyright years. 2018-01-03 11:03:58 +01:00
is_standard_layout Update copyright years. 2018-01-03 11:03:58 +01:00
is_swappable Update copyright years. 2018-01-03 11:03:58 +01:00
is_swappable_with Update copyright years. 2018-01-03 11:03:58 +01:00
is_trivial Update copyright years. 2018-01-03 11:03:58 +01:00
is_trivially_assignable Simplify the base characteristics for some type traits 2018-07-19 20:12:37 +01:00
is_trivially_constructible PR libstdc++/86398 fix std::is_trivially_constructible regression 2018-07-04 10:03:18 +01:00
is_trivially_copy_assignable Update copyright years. 2018-01-03 11:03:58 +01:00
is_trivially_copy_constructible Update copyright years. 2018-01-03 11:03:58 +01:00
is_trivially_copyable Update copyright years. 2018-01-03 11:03:58 +01:00
is_trivially_default_constructible Update copyright years. 2018-01-03 11:03:58 +01:00
is_trivially_destructible Update copyright years. 2018-01-03 11:03:58 +01:00
is_trivially_move_assignable Update copyright years. 2018-01-03 11:03:58 +01:00
is_trivially_move_constructible Update copyright years. 2018-01-03 11:03:58 +01:00
is_union Update copyright years. 2018-01-03 11:03:58 +01:00
is_unsigned Update copyright years. 2018-01-03 11:03:58 +01:00
is_void Update copyright years. 2018-01-03 11:03:58 +01:00
is_volatile Update copyright years. 2018-01-03 11:03:58 +01:00
logical_traits Update copyright years. 2018-01-03 11:03:58 +01:00
make_signed/requirements Remove dg-require-cstdint directive from tests 2018-07-26 15:02:26 +01:00
make_unsigned/requirements PR libstdc++/86398 fix std::is_trivially_constructible regression 2018-07-04 10:03:18 +01:00
memory_resource Add initial version of C++17 <memory_resource> header 2018-07-24 22:09:55 +01:00
monotonic_buffer_resource Add missing dg-require-cstdint directives to tests 2018-07-26 15:03:28 +01:00
move Update copyright years. 2018-01-03 11:03:58 +01:00
move_if_noexcept Update copyright years. 2018-01-03 11:03:58 +01:00
optional Refactor std::optional SFINAE constraints 2018-08-20 13:13:25 +01:00
owner_less Update copyright years. 2018-01-03 11:03:58 +01:00
pair PR libstdc++/86751 default assignment operators for std::pair 2018-07-31 23:31:20 +01:00
pointer_safety Update copyright years. 2018-01-03 11:03:58 +01:00
pointer_traits Update copyright years. 2018-01-03 11:03:58 +01:00
polymorphic_allocator Refactor uses-allocator construction 2018-08-15 20:20:02 +01:00
rank Update copyright years. 2018-01-03 11:03:58 +01:00
ratio Remove dg-require-cstdint directive from tests 2018-07-26 15:02:26 +01:00
raw_storage_iterator Update copyright years. 2018-01-03 11:03:58 +01:00
reference_wrapper Remove C++14-isms from C++11 tests 2018-08-23 09:26:22 +01:00
remove_all_extents Update copyright years. 2018-01-03 11:03:58 +01:00
remove_const Update copyright years. 2018-01-03 11:03:58 +01:00
remove_cv Update copyright years. 2018-01-03 11:03:58 +01:00
remove_cvref Add tests for std::remove_cvref 2018-05-03 16:12:19 +01:00
remove_extent Update copyright years. 2018-01-03 11:03:58 +01:00
remove_pointer Update copyright years. 2018-01-03 11:03:58 +01:00
remove_reference Update copyright years. 2018-01-03 11:03:58 +01:00
remove_volatile Update copyright years. 2018-01-03 11:03:58 +01:00
result_of Update copyright years. 2018-01-03 11:03:58 +01:00
scoped_allocator Reorder conditions in uses-allocator construction helper 2018-07-24 14:03:25 +01:00
shared_ptr Add missing dg-require-cstdint directives to tests 2018-07-26 15:03:28 +01:00
specialized_algorithms Use __builtin_memmove for trivially copyable types 2018-07-19 19:58:09 +01:00
steady_clock Update copyright years. 2018-01-03 11:03:58 +01:00
system_clock Remove dg-require-cstdint directive from tests 2018-07-26 15:02:26 +01:00
time_point Remove dg-require-cstdint directive from tests 2018-07-26 15:02:26 +01:00
time_point_cast Update copyright years. 2018-01-03 11:03:58 +01:00
to_address Update copyright years. 2018-01-03 11:03:58 +01:00
to_chars Update copyright years. 2018-01-03 11:03:58 +01:00
tuple PR libstdc++/86963 Implement LWG 2729 constraints on tuple assignment 2018-08-17 18:52:49 +01:00
type_identity/requirements P0887R1 The identity metafunction 2018-07-02 22:05:08 +01:00
typeindex Update copyright years. 2018-01-03 11:03:58 +01:00
underlying_type/requirements Update copyright years. 2018-01-03 11:03:58 +01:00
unique_ptr Implement LWG 2905 changes to constrain unique_ptr constructors 2018-09-11 11:55:49 +01:00
uses_allocator Reorder conditions in uses-allocator construction helper 2018-07-24 14:03:25 +01:00
variant PR libstdc++/86874 fix std::variant::swap regression 2018-08-07 20:13:26 +01:00
void_t Update copyright years. 2018-01-03 11:03:58 +01:00
weak_ptr Update copyright years. 2018-01-03 11:03:58 +01:00
rel_ops.cc Update copyright years. 2018-01-03 11:03:58 +01:00
temporary_buffer.cc Update copyright years. 2018-01-03 11:03:58 +01:00
variable_templates_for_traits.cc Update copyright years. 2018-01-03 11:03:58 +01:00