gcc/libstdc++-v3/testsuite
Jonathan Wakely dfaa3c47cc Add initial version of C++17 <memory_resource> header
This is missing the synchronized_pool_resource and
unsynchronized_pool_resource classes but is otherwise complete.

This is a new implementation, not based on the existing code in
<experimental/memory_resource>, but memory_resource and
polymorphic_allocator ended up looking almost the same anyway.

The constant_init kluge in src/c++17/memory_resource.cc is apparently
due to Richard Smith and ensures that the objects are constructed during
constant initialiation phase and not destroyed (because the
constant_init destructor doesn't destroy the union member and the
storage is not reused).

	* config/abi/pre/gnu.ver: Export new symbols.
	* configure: Regenerate.
	* include/Makefile.am: Add new <memory_resource> header.
	* include/Makefile.in: Regenerate.
	* include/precompiled/stdc++.h: Include <memory_resource> for C++17.
	* include/std/memory_resource: New header.
	(memory_resource, polymorphic_allocator, new_delete_resource)
	(null_memory_resource, set_default_resource, get_default_resource)
	(pool_options, monotonic_buffer_resource): Define.
	* src/Makefile.am: Add c++17 directory.
	* src/Makefile.in: Regenerate.
	* src/c++11/Makefile.am: Fix comment.
	* src/c++17/Makefile.am: Add makefile for new sub-directory.
	* src/c++17/Makefile.in: Generate.
	* src/c++17/memory_resource.cc: New.
	(newdel_res_t, null_res_t, constant_init, newdel_res, null_res)
	(default_res, new_delete_resource, null_memory_resource)
	(set_default_resource, get_default_resource): Define.
	* testsuite/20_util/memory_resource/1.cc: New test.
	* testsuite/20_util/memory_resource/2.cc: New test.
	* testsuite/20_util/monotonic_buffer_resource/1.cc: New test.
	* testsuite/20_util/monotonic_buffer_resource/allocate.cc: New test.
	* testsuite/20_util/monotonic_buffer_resource/deallocate.cc: New test.
	* testsuite/20_util/monotonic_buffer_resource/release.cc: New test.
	* testsuite/20_util/monotonic_buffer_resource/upstream_resource.cc:
	New test.
	* testsuite/20_util/polymorphic_allocator/1.cc: New test.
	* testsuite/20_util/polymorphic_allocator/resource.cc: New test.
	* testsuite/20_util/polymorphic_allocator/select.cc: New test.
	* testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource):
	Define concrete memory resource for testing.
	(__gnu_test::default_resource_mgr): Define RAII helper for changing
	default resource.

From-SVN: r262953
2018-07-24 22:09:55 +01:00
..
17_intro P0754R2 <version> header 2018-06-18 17:42:11 +01:00
18_support P0754R2 <version> header 2018-06-18 17:42:11 +01:00
19_diagnostics PR libstdc++/85831 define move constructors and operators for exceptions 2018-07-05 22:29:51 +01:00
20_util Add initial version of C++17 <memory_resource> header 2018-07-24 22:09:55 +01:00
21_strings functions.h (__gnu_debug::__check_string): Move... 2018-07-06 17:02:33 +00:00
22_locale P0935R0 Eradicating unnecessarily explicit default constructors 2018-06-14 15:12:24 +01:00
23_containers P0646R1 Improving the Return Value of Erase-Like Algorithms I 2018-07-04 21:15:01 +01:00
24_iterators safe_iterator.h (_Safe_iterator<>::_M_constant()): Rename in... 2018-05-09 20:04:46 +00:00
25_algorithms PR libstdc++/86658 fix __niter_wrap to not copy invalid iterators 2018-07-24 21:49:10 +01:00
26_numerics PR libstdc++/84928 use std::move in <numeric> algorithms 2018-07-06 15:16:13 +01:00
27_io P0935R0 Eradicating unnecessarily explicit default constructors 2018-07-06 13:39:02 +01:00
28_regex Optimize std::sub_match comparisons using string_view-like type 2018-07-02 21:31:11 +01:00
29_atomics Implement P0558R2 changes to std::atomic 2018-05-24 16:28:26 +01:00
30_threads PR libstdc++/84535 constrain std::thread constructor 2018-05-03 15:08:36 +01:00
abi Update copyright years. 2018-01-03 11:03:58 +01:00
backward Remove duplicate function call in test 2018-05-02 17:27:01 +01:00
config Update copyright years. 2018-01-03 11:03:58 +01:00
data
decimal Update copyright years. 2018-01-03 11:03:58 +01:00
experimental PR libstdc++/70940 optimize pmr::resource_adaptor for allocators using malloc 2018-07-23 20:40:28 +01:00
ext P0935R0 Eradicating unnecessarily explicit default constructors 2018-06-14 14:32:53 +01:00
lib Define "random_device" effective target 2018-07-04 17:56:21 +01:00
libstdc++-abi Update copyright years. 2018-01-03 11:03:58 +01:00
libstdc++-dg Update copyright years. 2018-01-03 11:03:58 +01:00
libstdc++-prettyprinters printers.py (NodeIteratorPrinter): New. 2018-03-08 06:26:15 +00:00
libstdc++-xmethods Update copyright years. 2018-01-03 11:03:58 +01:00
performance Update copyright years. 2018-01-03 11:03:58 +01:00
special_functions PR libstdc++/83140 - assoc_legendre returns negated value when m is odd 2018-05-10 13:59:52 +00:00
tr1 ...and actually resture the *new* testcase. 2018-05-11 17:38:26 +00:00
tr2 Update copyright years. 2018-01-03 11:03:58 +01:00
util Add initial version of C++17 <memory_resource> header 2018-07-24 22:09:55 +01:00
Makefile.am Update copyright years. 2018-01-03 11:03:58 +01:00
Makefile.in PR libstdc++/86450 use -Wabi=2 and simplify -Werror use 2018-07-17 14:18:47 +01:00