Skip to content

Commit 5cd457c

Browse files
committed
make bump_alloc usable in vector
1 parent 7f45695 commit 5cd457c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cp-algo/util/bump_alloc.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ namespace cp_algo {
88
static char* buf;
99
static size_t buf_ind;
1010
using value_type = T;
11+
template <class U> struct rebind { using other = bump_alloc<U, max_len>; };
12+
constexpr bool operator==(const bump_alloc&) const = default;
13+
constexpr bool operator!=(const bump_alloc&) const = default;
1114
bump_alloc() = default;
1215
template<class U> bump_alloc(const U&) {}
1316
T* allocate(size_t n) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy