File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed
cpp/common/test/includes/standard-library Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ #include <scoped_allocator.h>
Original file line number Diff line number Diff line change 1+ #ifndef _GHLIBCPP_SCOPED_ALLOCATOR
2+ #define _GHLIBCPP_SCOPED_ALLOCATOR
3+
4+ #include < cstddef>
5+ #include < memory>
6+
7+ namespace std {
8+
9+ // =============================================================================
10+ // std::scoped_allocator_adaptor
11+ // =============================================================================
12+
13+ template <typename T1, typename ... T2>
14+ class scoped_allocator_adaptor : public T1 {
15+ public:
16+ using outer_allocator_type = T1;
17+ using value_type = typename allocator_traits<T1>::value_type;
18+ using size_type = typename allocator_traits<T1>::size_type;
19+ using pointer = typename allocator_traits<T1>::pointer;
20+ using const_void_pointer = typename allocator_traits<T1>::const_void_pointer;
21+
22+ scoped_allocator_adaptor ();
23+ scoped_allocator_adaptor (const scoped_allocator_adaptor &) noexcept ;
24+ scoped_allocator_adaptor (scoped_allocator_adaptor &&) noexcept ;
25+
26+ ~scoped_allocator_adaptor () = default ;
27+
28+ pointer allocate (size_type);
29+ pointer allocate (size_type, const_void_pointer);
30+ void deallocate (pointer, size_type);
31+ };
32+
33+ } // namespace std
34+
35+ #endif // _GHLIBCPP_SCOPED_ALLOCATOR
You can’t perform that action at this time.
0 commit comments