Home
last modified time | relevance | path

Searched refs:allocator_traits (Results 1 – 25 of 83) sorted by relevance

1234

/llvm-project-15.0.7/libcxx/test/std/utilities/memory/allocator.traits/
H A Drebind_traits.pass.cpp68 …static_assert((std::is_same<std::allocator_traits<A<char> >::rebind_traits<double>, std::allocator… in main()
69 …static_assert((std::is_same<std::allocator_traits<B<int, char> >::rebind_traits<double>, std::allo… in main()
70 …static_assert((std::is_same<std::allocator_traits<C<char> >::rebind_traits<double>, std::allocator… in main()
71 …static_assert((std::is_same<std::allocator_traits<D<int, char> >::rebind_traits<double>, std::allo… in main()
72 …static_assert((std::is_same<std::allocator_traits<E<char> >::rebind_traits<double>, std::allocator… in main()
74 …static_assert((std::is_same<std::allocator_traits<A<char> >::rebind_traits<double>::other, std::al… in main()
75 …static_assert((std::is_same<std::allocator_traits<B<int, char> >::rebind_traits<double>::other, st… in main()
76 …static_assert((std::is_same<std::allocator_traits<C<char> >::rebind_traits<double>::other, std::al… in main()
77 …static_assert((std::is_same<std::allocator_traits<D<int, char> >::rebind_traits<double>::other, st… in main()
78 …static_assert((std::is_same<std::allocator_traits<E<char> >::rebind_traits<double>::other, std::al… in main()
/llvm-project-15.0.7/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/
H A Ddestroy_at.pass.cpp47 Array* ptr = std::allocator_traits<Alloc>::allocate(alloc, 1); in test_arrays()
59 std::allocator_traits<Alloc>::deallocate(alloc, ptr, 1); in test_arrays()
65 Array* ptr = std::allocator_traits<Alloc>::allocate(alloc, 1); in test_arrays()
78 std::allocator_traits<Alloc>::deallocate(alloc, ptr, 1); in test_arrays()
92 std::allocator_traits<Alloc>::construct(alloc, ptr1, &counter); in test()
93 std::allocator_traits<Alloc>::construct(alloc, ptr2, &counter); in test()
103 std::allocator_traits<Alloc>::deallocate(alloc, ptr1, 1); in test()
104 std::allocator_traits<Alloc>::deallocate(alloc, ptr2, 1); in test()
113 std::allocator_traits<Alloc>::construct(alloc, ptr1, &counter); in test()
124 std::allocator_traits<Alloc>::deallocate(alloc, ptr1, 1); in test()
[all …]
H A Ddestroy.pass.cpp38 Array* pool = std::allocator_traits<Alloc>::allocate(alloc, 5); in test_arrays()
43 std::allocator_traits<Alloc>::construct(alloc, std::addressof(arr[i]), &counter); in test_arrays()
52 std::allocator_traits<Alloc>::deallocate(alloc, pool, 5); in test_arrays()
59 Array* pool = std::allocator_traits<Alloc>::allocate(alloc, 5); in test_arrays()
65 … std::allocator_traits<Alloc>::construct(alloc, std::addressof(arr[i][j]), &counter); in test_arrays()
75 std::allocator_traits<Alloc>::deallocate(alloc, pool, 5); in test_arrays()
87 Counted* pool = std::allocator_traits<Alloc>::allocate(alloc, 5); in test()
90 std::allocator_traits<Alloc>::construct(alloc, p, &counter); in test()
97 std::allocator_traits<Alloc>::deallocate(alloc, pool, 5); in test()
H A Ddestroy_n.pass.cpp38 Array* pool = std::allocator_traits<Alloc>::allocate(alloc, 5); in test_arrays()
43 std::allocator_traits<Alloc>::construct(alloc, std::addressof(arr[i]), &counter); in test_arrays()
53 std::allocator_traits<Alloc>::deallocate(alloc, pool, 5); in test_arrays()
60 Array* pool = std::allocator_traits<Alloc>::allocate(alloc, 5); in test_arrays()
66 … std::allocator_traits<Alloc>::construct(alloc, std::addressof(arr[i][j]), &counter); in test_arrays()
77 std::allocator_traits<Alloc>::deallocate(alloc, pool, 5); in test_arrays()
89 Counted* pool = std::allocator_traits<Alloc>::allocate(alloc, 5); in test()
92 std::allocator_traits<Alloc>::construct(alloc, p, &counter); in test()
100 std::allocator_traits<Alloc>::deallocate(alloc, pool, 5); in test()
/llvm-project-15.0.7/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.types/
H A Dis_always_equal.pass.cpp29 std::allocator_traits<A1<int>>::is_always_equal, std::false_type>::value in main()
33 std::allocator_traits<min_allocator<int>>::is_always_equal, std::true_type>::value in main()
40 std::allocator_traits<A1<int>>::is_always_equal in main()
47 std::allocator_traits<min_allocator<int>>::is_always_equal in main()
53 ( std::allocator_traits<A1<int>>::is_always_equal::value && in main()
54 std::allocator_traits<A2<int>>::is_always_equal::value) in main()
60 ( std::allocator_traits<A1<int>>::is_always_equal::value && in main()
61 std::allocator_traits<min_allocator<int>>::is_always_equal::value) in main()
68 ( std::allocator_traits<A1<int>>::is_always_equal::value && in main()
69 std::allocator_traits<A2<int>>::is_always_equal::value && in main()
[all …]
/llvm-project-15.0.7/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/
H A Drebind_alloc.pass.cpp86 …static_assert((std::is_same<std::allocator_traits<A<char> >::rebind_alloc<double>, ReboundA<double… in main()
87 …static_assert((std::is_same<std::allocator_traits<B<int, char> >::rebind_alloc<double>, ReboundB<d… in main()
88 …static_assert((std::is_same<std::allocator_traits<C<char> >::rebind_alloc<double>, C<double> >::va… in main()
89 …static_assert((std::is_same<std::allocator_traits<D<int, char> >::rebind_alloc<double>, D<double, … in main()
90 …static_assert((std::is_same<std::allocator_traits<E<char> >::rebind_alloc<double>, E<double> >::va… in main()
91 …static_assert((std::is_same<std::allocator_traits<F<char> >::rebind_alloc<double>, F<double> >::va… in main()
92 …static_assert((std::is_same<std::allocator_traits<G<char> >::rebind_alloc<double>, G<double> >::va… in main()
94 …static_assert((std::is_same<std::allocator_traits<A<char> >::rebind_alloc<double>::other, ReboundA… in main()
96 …static_assert((std::is_same<std::allocator_traits<C<char> >::rebind_alloc<double>::other, C<double… in main()
97 …static_assert((std::is_same<std::allocator_traits<D<int, char> >::rebind_alloc<double>::other, D<d… in main()
[all …]
H A Dis_always_equal.pass.cpp46 …static_assert((std::is_same<std::allocator_traits<A<char> >::is_always_equal, std::true_type>::val… in main()
47 …static_assert((std::is_same<std::allocator_traits<B<char> >::is_always_equal, std::true_type>::val… in main()
48 …static_assert((std::is_same<std::allocator_traits<C<char> >::is_always_equal, std::false_type>::va… in main()
50 …static_assert((std::is_same<std::allocator_traits<A<const char> >::is_always_equal, std::true_type… in main()
51 …static_assert((std::is_same<std::allocator_traits<B<const char> >::is_always_equal, std::true_type… in main()
52 …static_assert((std::is_same<std::allocator_traits<C<const char> >::is_always_equal, std::false_typ… in main()
H A Dvoid_pointer.pass.cpp61 …static_assert((std::is_same<std::allocator_traits<A<char> >::void_pointer, Ptr<void> >::value), ""… in main()
62 static_assert((std::is_same<std::allocator_traits<B<char> >::void_pointer, void*>::value), ""); in main()
63 …static_assert((std::is_same<std::allocator_traits<C<char> >::void_pointer, CPtr<void> >::value), "… in main()
65 static_assert((std::is_same<std::allocator_traits<D<char> >::void_pointer, void*>::value), ""); in main()
H A Dconst_void_pointer.pass.cpp62 …static_assert((std::is_same<std::allocator_traits<A<char> >::const_void_pointer, Ptr<const void> >… in main()
63 …static_assert((std::is_same<std::allocator_traits<B<char> >::const_void_pointer, const void*>::val… in main()
64 …static_assert((std::is_same<std::allocator_traits<C<char> >::const_void_pointer, CPtr<const void> … in main()
66 …static_assert((std::is_same<std::allocator_traits<D<char> >::const_void_pointer, const void*>::val… in main()
H A Dsize_type.pass.cpp67 …static_assert((std::is_same<std::allocator_traits<A<char> >::size_type, unsigned short>::value), "… in main()
68 static_assert((std::is_same<std::allocator_traits<B<char> >::size_type, in main()
70 static_assert((std::is_same<std::allocator_traits<C<char> >::size_type, in main()
73 …static_assert((std::is_same<std::allocator_traits<D<char> >::size_type, unsigned short>::value), "… in main()
H A Dconst_pointer.pass.cpp60 …static_assert((std::is_same<std::allocator_traits<A<char> >::const_pointer, Ptr<const char> >::val… in main()
61 …static_assert((std::is_same<std::allocator_traits<B<char> >::const_pointer, const char*>::value), … in main()
62 …static_assert((std::is_same<std::allocator_traits<C<char> >::const_pointer, CPtr<const char> >::va… in main()
64 …static_assert((std::is_same<std::allocator_traits<D<char> >::const_pointer, const char*>::value), … in main()
H A Ddifference_type.pass.cpp71 … static_assert((std::is_same<std::allocator_traits<A<char> >::difference_type, short>::value), ""); in main()
72 …static_assert((std::is_same<std::allocator_traits<B<char> >::difference_type, std::ptrdiff_t>::val… in main()
73 …static_assert((std::is_same<std::allocator_traits<C<char> >::difference_type, signed char>::value)… in main()
75 …static_assert((std::is_same<std::allocator_traits<D<char> >::difference_type, std::ptrdiff_t>::val… in main()
H A Dpointer.pass.cpp48 static_assert((std::is_same<std::allocator_traits<A<char> >::pointer, Ptr<char> >::value), ""); in main()
49 static_assert((std::is_same<std::allocator_traits<B<char> >::pointer, char*>::value), ""); in main()
51 static_assert((std::is_same<std::allocator_traits<C<char> >::pointer, char*>::value), ""); in main()
H A Dpropagate_on_container_swap.pass.cpp47 …static_assert((std::is_same<std::allocator_traits<A<char> >::propagate_on_container_swap, std::tru… in main()
48 …static_assert((std::is_same<std::allocator_traits<B<char> >::propagate_on_container_swap, std::fal… in main()
50 …static_assert((std::is_same<std::allocator_traits<C<char> >::propagate_on_container_swap, std::fal… in main()
H A Dpropagate_on_container_copy_assignment.pass.cpp48 …static_assert((std::is_same<std::allocator_traits<A<char> >::propagate_on_container_copy_assignmen… in main()
49 …static_assert((std::is_same<std::allocator_traits<B<char> >::propagate_on_container_copy_assignmen… in main()
51 …static_assert((std::is_same<std::allocator_traits<C<char> >::propagate_on_container_copy_assignmen… in main()
H A Dpropagate_on_container_move_assignment.pass.cpp49 …static_assert((std::is_same<std::allocator_traits<A<char> >::propagate_on_container_move_assignmen… in main()
50 …static_assert((std::is_same<std::allocator_traits<B<char> >::propagate_on_container_move_assignmen… in main()
52 …static_assert((std::is_same<std::allocator_traits<C<char> >::propagate_on_container_move_assignmen… in main()
/llvm-project-15.0.7/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/
H A Ddestroy.pass.cpp88 CountDestructor* pool = std::allocator_traits<Alloc>::allocate(alloc, 1); in test()
90 std::allocator_traits<Alloc>::construct(alloc, pool, &destructors); in test()
93 std::allocator_traits<Alloc>::destroy(alloc, pool); in test()
96 std::allocator_traits<Alloc>::deallocate(alloc, pool, 1); in test()
102 T* pool = std::allocator_traits<Alloc>::allocate(alloc, 1); in test()
103 std::allocator_traits<Alloc>::construct(alloc, pool, nullptr); in test()
104 std::allocator_traits<Alloc>::destroy(alloc, pool); in test()
105 std::allocator_traits<Alloc>::deallocate(alloc, pool, 1); in test()
113 CountDestructor* pool = std::allocator_traits<Alloc>::allocate(alloc, 1); in test()
118 std::allocator_traits<Alloc>::destroy(alloc, pool); in test()
[all …]
H A Dmax_size.pass.cpp49 assert(std::allocator_traits<B<int> >::max_size(b) == 100); in test()
53 assert(std::allocator_traits<B<int> >::max_size(b) == 100); in test()
59 assert(std::allocator_traits<Alloc >::max_size(a) == 100); in test()
64 assert(std::allocator_traits<A<int> >::max_size(a) == in test()
69 assert(std::allocator_traits<A<int> >::max_size(a) == in test()
74 … static_assert(noexcept(std::allocator_traits<std::allocator<int>>::max_size(a)) == true, ""); in test()
H A Dselect_on_container_copy_construction.pass.cpp54 assert(std::allocator_traits<A<int> >::select_on_container_copy_construction(a).id == 0); in test()
58 assert(std::allocator_traits<A<int> >::select_on_container_copy_construction(a).id == 0); in test()
64 assert(std::allocator_traits<Alloc>::select_on_container_copy_construction(a).id == 0); in test()
69 assert(std::allocator_traits<B<int> >::select_on_container_copy_construction(b).id == 100); in test()
73 assert(std::allocator_traits<B<int> >::select_on_container_copy_construction(b).id == 100); in test()
H A Dconstruct.pass.cpp89 std::allocator_traits<A<A0> >::construct(a, a0, &A0_count); in test()
99 std::allocator_traits<A<A1> >::construct(a, a1, &A1_count, 'c'); in test()
109 std::allocator_traits<A<A2> >::construct(a, a2, &A2_count, 'd', 5); in test()
119 std::allocator_traits<Alloc>::construct(a, vt, nullptr); in test()
132 std::allocator_traits<B<A0> >::construct(b, a0, &A0_count); in test()
145 std::allocator_traits<B<A1> >::construct(b, a1, &A1_count, 'c'); in test()
158 std::allocator_traits<B<A2> >::construct(b, a2, &A2_count, 'd', 5); in test()
H A Dallocate_hint.pass.cpp61 assert(std::allocator_traits<A<int> >::allocate(a, 10, nullptr) == &a.storage); in test()
66 assert(std::allocator_traits<Alloc>::allocate(a, 10, nullptr) == &a.storage); in test()
71 assert(std::allocator_traits<B<int> >::allocate(b, 11, nullptr) == &b.storage); in test()
76 assert(std::allocator_traits<Alloc>::allocate(b, 11, nullptr) == &b.storage); in test()
/llvm-project-15.0.7/libcxx/include/__memory/
H A Dallocation_guard.h45 using _Pointer = typename allocator_traits<_Alloc>::pointer;
46 using _Size = typename allocator_traits<_Alloc>::size_type;
53 … , __ptr_(allocator_traits<_Alloc>::allocate(__alloc_, __n_)) // initialization order is important in __allocation_guard()
59 allocator_traits<_Alloc>::deallocate(__alloc_, __ptr_, __n_); in ~__allocation_guard()
/llvm-project-15.0.7/clang/test/SemaCXX/
H A DPR9902.cpp17 struct allocator_traits struct
20 template <class T> using rebind_traits = allocator_traits<rebind_alloc<T>>; argument
28 allocator_traits<allocator<char>>::rebind_alloc<int> a; in main()
H A DPR9908.cpp11 struct allocator_traits struct
16 template <class T> using rebind_traits = allocator_traits<rebind_alloc<T>>; argument
32 allocator_traits<A<char> >::rebind_traits<double> a; in main()
/llvm-project-15.0.7/libcxx/include/
H A Dscoped_allocator136 static const bool value = allocator_traits<_A0>::
153 static const bool value = allocator_traits<_A0>::
170 static const bool value = allocator_traits<_A0>::
194 allocator_traits<_A0>::is_always_equal::value &&
277 allocator_traits<outer_allocator_type>::
279 allocator_traits<inner_allocator_type>::
342 allocator_traits<outer_allocator_type>::
488 {return allocator_traits<outer_allocator_type>::
492 {return allocator_traits<outer_allocator_type>::
497 {allocator_traits<outer_allocator_type>::
[all …]

1234