Skip to content

Commit 706fde4

Browse files
authored
Merge pull request #1065 from ArsenArsen/cpp_gcc13
test: Add missing rebind to allocators
2 parents 1edfba0 + 2dd3dbc commit 706fde4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/msgpack_cpp11.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,9 @@ struct equal_to : std::equal_to<Key> {
252252
template <class Key>
253253
struct set_allocator : std::allocator<Key> {
254254
using std::allocator<Key>::allocator;
255+
256+
template<class U>
257+
struct rebind { using other = set_allocator<U>; };
255258
};
256259

257260
// C++ named requirement Allocator implies that the first template type
@@ -262,6 +265,9 @@ struct set_allocator : std::allocator<Key> {
262265
template <typename KeyValuePair>
263266
struct map_allocator_impl : std::allocator<KeyValuePair> {
264267
using std::allocator<KeyValuePair>::allocator;
268+
269+
template<class U>
270+
struct rebind { using other = map_allocator_impl<U>; };
265271
};
266272

267273
template <class Key, class T>
@@ -270,6 +276,9 @@ using map_allocator = map_allocator_impl<std::pair<const Key, T>>;
270276
template <class T>
271277
struct allocator : std::allocator<T> {
272278
using std::allocator<T>::allocator;
279+
280+
template<class U>
281+
struct rebind { using other = allocator<U>; };
273282
};
274283

275284
} // namespace test

0 commit comments

Comments
 (0)