Warning, /include/c++/v1/memory_resource is written in an unsupported language. File is not indexed.
0001 // -*- C++ -*-
0002 //===----------------------------------------------------------------------===//
0003 //
0004 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0005 // See https://llvm.org/LICENSE.txt for license information.
0006 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0007 //
0008 //===----------------------------------------------------------------------===//
0009
0010 #ifndef _LIBCPP_MEMORY_RESOURCE
0011 #define _LIBCPP_MEMORY_RESOURCE
0012
0013 /**
0014 memory_resource synopsis
0015
0016 // C++17
0017
0018 namespace std::pmr {
0019
0020 class memory_resource;
0021
0022 bool operator==(const memory_resource& a,
0023 const memory_resource& b) noexcept;
0024 bool operator!=(const memory_resource& a,
0025 const memory_resource& b) noexcept; // removed in C++20
0026
0027 template <class Tp> class polymorphic_allocator;
0028
0029 template <class T1, class T2>
0030 bool operator==(const polymorphic_allocator<T1>& a,
0031 const polymorphic_allocator<T2>& b) noexcept;
0032 template <class T1, class T2>
0033 bool operator!=(const polymorphic_allocator<T1>& a,
0034 const polymorphic_allocator<T2>& b) noexcept; // removed in C++20
0035
0036 // Global memory resources
0037 memory_resource* set_default_resource(memory_resource* r) noexcept;
0038 memory_resource* get_default_resource() noexcept;
0039 memory_resource* new_delete_resource() noexcept;
0040 memory_resource* null_memory_resource() noexcept;
0041
0042 // Pool resource classes
0043 struct pool_options;
0044 class synchronized_pool_resource;
0045 class unsynchronized_pool_resource;
0046 class monotonic_buffer_resource;
0047
0048 } // namespace std::pmr
0049
0050 */
0051
0052 #if __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
0053 # include <__cxx03/memory_resource>
0054 #else
0055 # include <__config>
0056
0057 # if _LIBCPP_STD_VER >= 17
0058 # include <__memory_resource/memory_resource.h>
0059 # include <__memory_resource/monotonic_buffer_resource.h>
0060 # include <__memory_resource/polymorphic_allocator.h>
0061 # include <__memory_resource/pool_options.h>
0062 # include <__memory_resource/synchronized_pool_resource.h>
0063 # include <__memory_resource/unsynchronized_pool_resource.h>
0064 # endif
0065
0066 # include <version>
0067
0068 # if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0069 # pragma GCC system_header
0070 # endif
0071
0072 # if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER >= 17 && _LIBCPP_STD_VER <= 20
0073 # include <mutex>
0074 # endif
0075
0076 # if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
0077 # include <stdexcept>
0078 # endif
0079 #endif // __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
0080
0081 #endif /* _LIBCPP_MEMORY_RESOURCE */