b1e7c6fce1
By moving std::make_obj_using_allocator and the related "utility functions for uses-allocator construction" to a new header, we can avoid including the whole of <memory> in <scoped_allocator> and <memory_resource>. In order to simplify the implementation of those utility functions they now use concepts unconditionally. They are no longer defined if __cpp_concepts is not defined. To simplify the code that uses those functions I've introduced a __cpp_lib_make_obj_using_allocator feature test macro (not specified in the standard, which might be an oversight). That allows the code in <memory_resource> and <scoped_allocator> to check the feature test macro to decide whether to use the new utilities, or fall back to the C++17 code. At the same time, this reshuffles some of the headers included by <memory> so that they are (mostly?) self-contained. It should no longer be necessary to include other headers before <bits/shared_ptr.h> when other parts of the library want to use std::shared_ptr without including the whole of <memory>. libstdc++-v3/ChangeLog: * include/Makefile.am: Add new header. * include/Makefile.in: Regenerate. * include/bits/shared_ptr.h: Include <iosfwd>. * include/bits/shared_ptr_base.h: Include required headers here directly, instead of in <memory>. * include/bits/uses_allocator_args.h: New file. Move utility functions for uses-allocator construction from <memory> to here. Only define the utility functions when concepts are available. (__cpp_lib_make_obj_using_allocator): Define non-standard feature test macro. * include/std/condition_variable: Remove unused headers. * include/std/future: Likewise. * include/std/memory: Remove headers that are not needed directly, and are now inclkuded where they're needed. Include new <bits/uses_allocator_args.h> header. * include/std/memory_resource: Include only the necessary headers. Use new feature test macro to detect support for the utility functions. * include/std/scoped_allocator: Likewise. * include/std/version (__cpp_lib_make_obj_using_allocator): Define. |
||
---|---|---|
.. | ||
algorithmfwd.h | ||
align.h | ||
alloc_traits.h | ||
allocated_ptr.h | ||
allocator.h | ||
atomic_base.h | ||
atomic_futex.h | ||
basic_ios.h | ||
basic_ios.tcc | ||
basic_string.h | ||
basic_string.tcc | ||
boost_concept_check.h | ||
c++0x_warning.h | ||
c++config | ||
char_traits.h | ||
charconv.h | ||
codecvt.h | ||
concept_check.h | ||
cpp_type_traits.h | ||
deque.tcc | ||
enable_special_members.h | ||
erase_if.h | ||
forward_list.h | ||
forward_list.tcc | ||
fs_dir.h | ||
fs_fwd.h | ||
fs_ops.h | ||
fs_path.h | ||
fstream.tcc | ||
functexcept.h | ||
functional_hash.h | ||
gslice_array.h | ||
gslice.h | ||
hashtable_policy.h | ||
hashtable.h | ||
indirect_array.h | ||
invoke.h | ||
ios_base.h | ||
istream.tcc | ||
iterator_concepts.h | ||
list.tcc | ||
locale_classes.h | ||
locale_classes.tcc | ||
locale_conv.h | ||
locale_facets_nonio.h | ||
locale_facets_nonio.tcc | ||
locale_facets.h | ||
locale_facets.tcc | ||
localefwd.h | ||
mask_array.h | ||
max_size_type.h | ||
memoryfwd.h | ||
move.h | ||
node_handle.h | ||
ostream_insert.h | ||
ostream.tcc | ||
parse_numbers.h | ||
postypes.h | ||
predefined_ops.h | ||
ptr_traits.h | ||
quoted_string.h | ||
random.h | ||
random.tcc | ||
range_access.h | ||
ranges_algo.h | ||
ranges_algobase.h | ||
ranges_base.h | ||
ranges_cmp.h | ||
ranges_uninitialized.h | ||
ranges_util.h | ||
refwrap.h | ||
regex_automaton.h | ||
regex_automaton.tcc | ||
regex_compiler.h | ||
regex_compiler.tcc | ||
regex_constants.h | ||
regex_error.h | ||
regex_executor.h | ||
regex_executor.tcc | ||
regex_scanner.h | ||
regex_scanner.tcc | ||
regex.h | ||
regex.tcc | ||
shared_ptr_atomic.h | ||
shared_ptr_base.h | ||
shared_ptr.h | ||
slice_array.h | ||
specfun.h | ||
sstream.tcc | ||
std_abs.h | ||
std_function.h | ||
std_mutex.h | ||
stl_algo.h | ||
stl_algobase.h | ||
stl_bvector.h | ||
stl_construct.h | ||
stl_deque.h | ||
stl_function.h | ||
stl_heap.h | ||
stl_iterator_base_funcs.h | ||
stl_iterator_base_types.h | ||
stl_iterator.h | ||
stl_list.h | ||
stl_map.h | ||
stl_multimap.h | ||
stl_multiset.h | ||
stl_numeric.h | ||
stl_pair.h | ||
stl_queue.h | ||
stl_raw_storage_iter.h | ||
stl_relops.h | ||
stl_set.h | ||
stl_stack.h | ||
stl_tempbuf.h | ||
stl_tree.h | ||
stl_uninitialized.h | ||
stl_vector.h | ||
stream_iterator.h | ||
streambuf_iterator.h | ||
streambuf.tcc | ||
string_view.tcc | ||
stringfwd.h | ||
uniform_int_dist.h | ||
unique_lock.h | ||
unique_ptr.h | ||
unordered_map.h | ||
unordered_set.h | ||
uses_allocator_args.h | ||
uses_allocator.h | ||
valarray_after.h | ||
valarray_array.h | ||
valarray_array.tcc | ||
valarray_before.h | ||
vector.tcc |