Skip to content

Commit dc5a0f1

Browse files
authored
Merge pull request google#121 from tpudlik/allocator
Remove references to deprecated allocator members
2 parents a5126d6 + 1ea8916 commit dc5a0f1

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

.bazelrc

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Emboss doesn't (yet) support bzlmod.
2+
common --noenable_bzlmod
13
# Emboss (at least notionally) supports C++11 until (at least) 2027. However,
24
# Googletest requires C++14, which means that all of the Emboss unit tests
35
# require C++14 to run.

runtime/cpp/test/emboss_memory_util_test.cc

+7-7
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,13 @@ TEST(ContiguousBuffer, OffsetStorageType) {
174174
// std::basic_string<> with non-default trailing template parameters.
175175
template <class T>
176176
struct NonstandardAllocator {
177-
using value_type = typename ::std::allocator<T>::value_type;
178-
using pointer = typename ::std::allocator<T>::pointer;
179-
using const_pointer = typename ::std::allocator<T>::const_pointer;
180-
using reference = typename ::std::allocator<T>::reference;
181-
using const_reference = typename ::std::allocator<T>::const_reference;
182-
using size_type = typename ::std::allocator<T>::size_type;
183-
using difference_type = typename ::std::allocator<T>::difference_type;
177+
using value_type = typename ::std::allocator_traits<::std::allocator<T>>::value_type;
178+
using pointer = typename ::std::allocator_traits<::std::allocator<T>>::pointer;
179+
using const_pointer = typename ::std::allocator_traits<::std::allocator<T>>::const_pointer;
180+
using reference = typename ::std::allocator<T>::value_type &;
181+
using const_reference = const typename ::std::allocator_traits<::std::allocator<T>>::value_type &;
182+
using size_type = typename ::std::allocator_traits<::std::allocator<T>>::size_type;
183+
using difference_type = typename ::std::allocator_traits<::std::allocator<T>>::difference_type;
184184

185185
template <class U>
186186
struct rebind {

0 commit comments

Comments
 (0)