mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
libstdc++: fix allocator_traits<>::allocate_at_least
allocator_traits<>::allocate_at_least has taken its allocator by value, incorrectly. This patch makes it take its allocator by reference, as specified. libstdc++-v3/ChangeLog: * include/bits/alloc_traits.h (allocate_at_least): Take allocator argument by reference, per Standard.
This commit is contained in:
@@ -670,7 +670,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
* Returns `a.allocate_at_least(n)`.
|
||||
*/
|
||||
[[nodiscard]] static constexpr auto
|
||||
allocate_at_least(allocator_type __a, size_type __n)
|
||||
allocate_at_least(allocator_type& __a, size_type __n)
|
||||
-> allocation_result<pointer, size_type>
|
||||
{ return __a.allocate_at_least(__n); }
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user