gcc/libstdc++-v3/testsuite/20_util
Jonathan Wakely 7663cae227 Constrain std::shared_ptr assignment and resetting
* include/bits/shared_ptr.h (_Assignable): New alias template.
	(shared_ptr::operator=(const shared_ptr<_Tp1>&))
	(shared_ptr::operator=(shared_ptr<_Tp1>&&))
	(shared_ptr::operator=(unique_ptr<_Tp1>&&)): Constrain with
	_Assignable.
	* include/bits/shared_ptr_base.h (_Assignable): New alias template.
	(__shared_ptr::operator=(const __shared_ptr<_Tp1>&))
	(__shared_ptr::operator=(__shared_ptr<_Tp1>&&))
	(__shared_ptr::operator=(unique_ptr<_Tp1>&&)): Constrain with
	_Assignable.
	(__shared_ptr::reset(_Tp1*), __shared_ptr::reset(_Tp1*, _Deleter))
	(__shared_ptr::reset(_Tp1*, _Deleter, _Alloc)): Constrain with
	_Convertible.
	* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Change dg-error to
	match on any line.
	* testsuite/20_util/shared_ptr/cons/void_neg.cc: Likewise.
	* testsuite/20_util/shared_ptr/assign/sfinae.cc: New test.
	* testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc: Update
	expected errors. Remove unnecessary code.
	* testsuite/20_util/shared_ptr/modifiers/reset_sfinae.cc: New test.

From-SVN: r239898
2016-08-31 17:57:20 +01:00
..
add_const Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
add_cv Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
add_lvalue_reference Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
add_pointer Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
add_rvalue_reference Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
add_volatile Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
addressof Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
align Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
aligned_storage Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
aligned_union Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
alignment_of Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
allocator Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
allocator_traits Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
any Implement LWG 2744 and LWG 2754. 2016-08-15 18:06:09 +03:00
as_const Define std::as_const 2016-08-03 19:11:23 +01:00
auto_ptr Update copyright years. 2016-01-04 15:30:50 +01:00
bad_function_call Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
bind Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
bool_constant Update copyright years. 2016-01-04 15:30:50 +01:00
common_type/requirements Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
conditional/requirements Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
decay/requirements Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
declval/requirements re PR libstdc++/77395 (std::is_constructible is false for type constructible via implicit conversion operator affecting std::tuple) 2016-08-30 21:46:11 +03:00
default_delete Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
duration Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
duration_cast Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
enable_if/requirements Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
enable_shared_from_this Add test accidentally not added in revision r239121 2016-08-31 17:57:09 +01:00
exchange Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
extent Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
forward Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
function Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
function_objects Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
has_virtual_destructor Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
hash Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
headers Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
in_place Implement P0032R3, Homogeneous interface for variant, any and optional, 2016-07-14 12:10:05 +03:00
integer_sequence Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
integral_constant Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_abstract Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_arithmetic Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_array Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_assignable Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_base_of Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_callable Define std::is_callable and std::is_nothrow_callable 2016-08-04 19:02:56 +01:00
is_class Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_compound Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_const Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_constructible re PR libstdc++/77395 (std::is_constructible is false for type constructible via implicit conversion operator affecting std::tuple) 2016-08-30 21:46:11 +03:00
is_convertible Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_copy_assignable Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_copy_constructible Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_default_constructible Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_destructible Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_empty Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_enum Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_final Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_floating_point Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_function Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_fundamental Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_implicitly_default_constructible Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_integral Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_literal_type Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_lvalue_reference Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_member_function_pointer Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_member_object_pointer Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_member_pointer Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_move_assignable Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_move_constructible Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_nothrow_assignable Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_nothrow_callable Define std::is_callable and std::is_nothrow_callable 2016-08-04 19:02:56 +01:00
is_nothrow_constructible Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_nothrow_copy_assignable Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_nothrow_copy_constructible Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_nothrow_default_constructible Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_nothrow_destructible Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_nothrow_move_assignable Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_nothrow_move_constructible Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_nothrow_swappable Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_nothrow_swappable_with Provide swappable traits (p0185r1) 2016-06-16 16:07:19 +01:00
is_null_pointer Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_object Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_pod Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_pointer Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_polymorphic Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_reference Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_rvalue_reference Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_same Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_scalar Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_signed Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_standard_layout Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_swappable Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_swappable_with Provide swappable traits (p0185r1) 2016-06-16 16:07:19 +01:00
is_trivial Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_trivially_assignable Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_trivially_constructible Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_trivially_copy_assignable Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_trivially_copy_constructible Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_trivially_copyable Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_trivially_default_constructible Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_trivially_destructible Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_trivially_move_assignable Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_trivially_move_constructible Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_union Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_unsigned Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_void Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
is_volatile Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
logical_traits Update copyright years. 2016-01-04 15:30:50 +01:00
make_signed/requirements re PR libstdc++/77395 (std::is_constructible is false for type constructible via implicit conversion operator affecting std::tuple) 2016-08-30 21:46:11 +03:00
make_unsigned/requirements re PR libstdc++/77395 (std::is_constructible is false for type constructible via implicit conversion operator affecting std::tuple) 2016-08-30 21:46:11 +03:00
move Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
move_if_noexcept Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
not_fn Define std::not_fn for C++17 2016-08-19 16:42:34 +01:00
optional Implement the latest proposed resolution of LWG 2756. 2016-08-18 23:33:57 +03:00
owner_less Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
pair Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
pointer_safety Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
pointer_traits Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
rank Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
ratio Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
raw_storage_iterator libstdc++/51960 move-construction for raw_storage_iterator 2016-08-26 14:11:29 +01:00
reference_wrapper Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
remove_all_extents Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
remove_const Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
remove_cv Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
remove_extent Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
remove_pointer Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
remove_reference Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
remove_volatile Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
result_of Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
scoped_allocator Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
shared_ptr Constrain std::shared_ptr assignment and resetting 2016-08-31 17:57:20 +01:00
specialized_algorithms Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
steady_clock Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
system_clock Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
time_point Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
time_point_cast Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
tuple re PR libstdc++/77395 (std::is_constructible is false for type constructible via implicit conversion operator affecting std::tuple) 2016-08-30 21:46:11 +03:00
typeindex Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
underlying_type/requirements Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
unique_ptr Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
uses_allocator Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
variant Implement <variant> 2016-08-18 20:31:26 +00:00
void_t Update copyright years. 2016-01-04 15:30:50 +01:00
weak_ptr Use effective-target instead of -std options 2016-08-26 12:41:37 +01:00
rel_ops.cc Update copyright years. 2016-01-04 15:30:50 +01:00
temporary_buffer.cc Update copyright years. 2016-01-04 15:30:50 +01:00
variable_templates_for_traits.cc Implement C++17 variable templates for type traits. 2016-07-29 22:01:39 +03:00