gcc/libstdc++-v3/include/bits
Jonathan Wakely b479fbad24 Refactor uses-allocator construction
Remove duplicated logic in experimental::pmr::polymorphic_allocator by
calling the __uses_allocator_construct helper.

Fix bugs in std::pmr::polymorphic_allocator with incorrect SFINAE
constraint and incorrect argument order.

	* include/bits/uses_allocator.h (__uses_allocator_construct): Qualify
	calls to __uses_allocator_construct_impl and __use_alloc.
	* include/experimental/memory_resource
	(polymorphic_allocator::_M_construct): Remove.
	(polymorphic_allocator::construct): Call __uses_allocator_construct.
	Qualify calls to __use_alloc.
	* include/std/memory_resource (polymorphic_allocator::construct): Fix
	type in SFINAE constraint. Use constexpr if instead of tag dispatching
	to _S_construct overloads.
	(polymorphic_allocator::construct(pair<T1, T2>*, ...)): Fix order of
	arguments to _S_construct_p.
	(polymorphic_allocator::_S_construct): Remove.
	(polymorphic_allocator::_S_construct_p): Return allocators by value
	not by reference.
	* include/std/scoped_allocator (scoped_allocator_adaptor::construct):
	Qualify calls to __use_alloc.
	* testsuite/20_util/polymorphic_allocator/construct_pair.cc: New test,
	copied from testsuite/20_util/scoped_allocator/construct_pair.cc.
	* testsuite/experimental/polymorphic_allocator/1.cc: New test.
	* testsuite/experimental/polymorphic_allocator/construct_pair.cc:
	New test.

From-SVN: r263566
2018-08-15 20:20:02 +01:00
..
algorithmfwd.h
alloc_traits.h Remove redundant #if conditional 2018-07-03 22:04:37 +01:00
allocated_ptr.h
allocator.h LWG 3035. std::allocator's constructors should be constexpr 2018-06-18 16:47:07 +01:00
atomic_base.h Implement P0558R2 changes to std::atomic 2018-05-24 16:28:26 +01:00
atomic_futex.h Remove <chrono> dependency on _GLIBCXX_USE_C99_STDINT_TR1 2018-07-26 15:01:55 +01:00
basic_ios.h
basic_ios.tcc
basic_string.h Remove char16_t and char32_t dependency on <stdint.h> 2018-07-26 15:02:01 +01:00
basic_string.tcc PR libstdc++/58265 implement LWG 2063 for COW strings 2018-07-05 16:56:06 +01:00
boost_concept_check.h
c++0x_warning.h
c++config Don't unconditionally define feature test macros in <version> 2018-07-31 23:31:14 +01:00
char_traits.h Remove char16_t and char32_t dependency on <stdint.h> 2018-07-26 15:02:01 +01:00
codecvt.h Remove char16_t and char32_t dependency on <stdint.h> 2018-07-26 15:02:01 +01:00
concept_check.h
cpp_type_traits.h Add std::__is_byte<std::byte> specialization 2018-06-27 11:30:52 +01:00
deque.tcc deque.tcc (deque<>::_M_assign_aux): Cast to void to ensure overloaded comma not used. 2018-05-02 19:51:33 +00:00
enable_special_members.h
forward_list.h P0646R1 Improving the Return Value of Erase-Like Algorithms I 2018-07-04 21:15:01 +01:00
forward_list.tcc P0646R1 Improving the Return Value of Erase-Like Algorithms I 2018-07-04 21:15:01 +01:00
fs_dir.h PR libstdc++/86597 directory_entry observers should clear error_code 2018-08-08 14:09:19 +01:00
fs_fwd.h
fs_ops.h
fs_path.h LWG 2989 hide path iostream operators from normal lookup 2018-06-18 19:59:44 +01:00
fstream.tcc PR libstdc++/85343 overload __throw_ios_failure to take errno 2018-08-14 13:09:57 +01:00
functexcept.h PR libstdc++/85343 overload __throw_ios_failure to take errno 2018-08-14 13:09:57 +01:00
functional_hash.h
gslice_array.h PR libstdc++/83860 avoid dangling references in valarray closure types 2018-05-02 17:41:46 +01:00
gslice.h
hashtable_policy.h Modify some library internals to work without <stdint.h> 2018-07-26 15:02:05 +01:00
hashtable.h
indirect_array.h
invoke.h
ios_base.h Define special members as defaulted 2018-06-08 17:43:14 +01:00
istream.tcc
list.tcc P0646R1 Improving the Return Value of Erase-Like Algorithms I 2018-07-04 21:15:01 +01:00
locale_classes.h
locale_classes.tcc
locale_conv.h P0935R0 Eradicating unnecessarily explicit default constructors 2018-06-14 15:12:24 +01:00
locale_facets_nonio.h
locale_facets_nonio.tcc
locale_facets.h Remove char16_t and char32_t dependency on <stdint.h> 2018-07-26 15:02:01 +01:00
locale_facets.tcc
localefwd.h
mask_array.h PR libstdc++/83860 avoid dangling references in valarray closure types 2018-05-02 17:41:46 +01:00
memoryfwd.h
move.h
node_handle.h PR libstdc++/82966 fix swapping of node handles 2018-05-14 15:27:54 +01:00
ostream_insert.h
ostream.tcc
parse_numbers.h PR libstdc++/84671 handle digit separators in duration literals 2018-03-02 20:38:50 +00:00
postypes.h Define std::fpos special members as defaulted 2018-06-04 17:07:55 +01:00
predefined_ops.h
ptr_traits.h
quoted_string.h PR libstdc++/86008 add std::quoted support for string_view 2018-06-06 07:05:07 +01:00
random.h PR libstdc++/86168 fix ambiguous default constructor 2018-06-15 17:11:12 +01:00
random.tcc PR libstdc++/85749 constrain seed sequences for random number engines 2018-05-15 16:36:46 +01:00
range_access.h
refwrap.h LWG 2993 reference_wrapper<T> conversion from T&& 2018-06-15 15:19:47 +01:00
regex_automaton.h PR libstdc++/85098 add missing definitions for static constants 2018-05-18 17:14:04 +01:00
regex_automaton.tcc
regex_compiler.h Optimize std::sub_match comparisons using string_view-like type 2018-07-02 21:31:11 +01:00
regex_compiler.tcc PR libstdc++/85098 add missing definitions for static constants 2018-05-18 17:14:04 +01:00
regex_constants.h
regex_error.h
regex_executor.h
regex_executor.tcc
regex_scanner.h
regex_scanner.tcc
regex.h Optimize std::sub_match comparisons using string_view-like type 2018-07-02 21:31:11 +01:00
regex.tcc Add missing noexcept on definition to match declaration 2018-06-26 13:24:47 +01:00
shared_ptr_atomic.h
shared_ptr_base.h Use default visibility to work around clang -fvisibility-inlines-hidden bug 2018-07-20 12:24:55 +01:00
shared_ptr.h PR libstdc++/86537 remove less<shared_ptr<T>> partial specialization 2018-07-16 18:13:41 +01:00
slice_array.h PR libstdc++/83860 avoid dangling references in valarray closure types 2018-05-02 17:41:46 +01:00
specfun.h
sstream.tcc
std_abs.h PR libstdc++/85729 add linkage specifications to headers 2018-05-10 13:35:45 +01:00
std_function.h Make std::function tolerate semantically non-CopyConstructible objects 2018-05-09 14:28:11 +01:00
std_mutex.h Move std::unique_lock definition to a separate header 2018-07-25 11:40:12 +01:00
stl_algo.h 2018-08-08 François Dumont <fdumont@gcc.gnu.org> 2018-08-08 20:28:21 +00:00
stl_algobase.h PR libstdc++/86658 fix __niter_wrap to not copy invalid iterators 2018-07-24 21:49:10 +01:00
stl_bvector.h Define special members as defaulted 2018-06-08 17:43:14 +01:00
stl_construct.h
stl_deque.h Some libstdc++ fixes for -Wdeprecated-copy. 2018-05-18 16:02:14 -04:00
stl_function.h PR libstdc++/85040 fix std::less<void> etc. ambiguities 2018-03-22 14:23:27 +00:00
stl_heap.h
stl_iterator_base_funcs.h
stl_iterator_base_types.h
stl_iterator.h stl_iterator.h: Fix comment. 2018-08-05 15:33:58 +00:00
stl_list.h P0646R1 Improving the Return Value of Erase-Like Algorithms I 2018-07-04 21:15:01 +01:00
stl_map.h P0458R2 Checking for Existence of an Element in Associative Containers 2018-07-04 19:16:26 +01:00
stl_multimap.h P0458R2 Checking for Existence of an Element in Associative Containers 2018-07-04 19:16:26 +01:00
stl_multiset.h P0458R2 Checking for Existence of an Element in Associative Containers 2018-07-04 19:16:26 +01:00
stl_numeric.h PR libstdc++/84928 use std::move in <numeric> algorithms 2018-07-06 15:16:13 +01:00
stl_pair.h PR libstdc++/86751 default assignment operators for std::pair 2018-07-31 23:31:20 +01:00
stl_queue.h
stl_raw_storage_iter.h
stl_relops.h
stl_set.h P0458R2 Checking for Existence of an Element in Associative Containers 2018-07-04 19:16:26 +01:00
stl_stack.h
stl_tempbuf.h PR libstdc++/86954 use non-placement operator delete 2018-08-14 21:19:20 +01:00
stl_tree.h PR libstdc++/45093 avoid warnings for _M_destroy_node 2018-08-13 19:54:43 +01:00
stl_uninitialized.h
stl_vector.h optimize std::vector move assignment 2018-07-26 12:01:14 +00:00
stream_iterator.h Define special members as defaulted 2018-06-08 17:43:14 +01:00
streambuf_iterator.h Define special members as defaulted 2018-06-08 17:43:14 +01:00
streambuf.tcc
string_view.tcc
stringfwd.h Remove char16_t and char32_t dependency on <stdint.h> 2018-07-26 15:02:01 +01:00
uniform_int_dist.h P0935R0 Eradicating unnecessarily explicit default constructors 2018-06-14 14:32:53 +01:00
unique_lock.h Remove <chrono> dependency on _GLIBCXX_USE_C99_STDINT_TR1 2018-07-26 15:01:55 +01:00
unique_ptr.h
unordered_map.h P0458R2 Checking for Existence of an Element in Associative Containers 2018-07-04 19:16:26 +01:00
unordered_set.h P0458R2 Checking for Existence of an Element in Associative Containers 2018-07-04 19:16:26 +01:00
uses_allocator.h Refactor uses-allocator construction 2018-08-15 20:20:02 +01:00
valarray_after.h LWG 3074 make scalar types non-deduced in valarray non-member functions 2018-06-14 20:36:54 +01:00
valarray_array.h Add __attribute__((malloc) to allocator and remove unused code 2018-05-14 16:35:12 +01:00
valarray_array.tcc
valarray_before.h PR libstdc++/83860 avoid dangling references in valarray closure types 2018-05-02 17:41:46 +01:00
vector.tcc PR libstdc++/83982 fix exception-safety guarantee of std::vector::resize 2018-06-14 10:26:51 +01:00