Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5cd457c

Browse files
committed
make bump_alloc usable in vector
1 parent7f45695 commit5cd457c

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
staticchar* buf;
99
staticsize_t buf_ind;
1010
using value_type = T;
11+
template<classU>structrebind {using other = bump_alloc<U, max_len>; };
12+
constexprbooloperator==(const bump_alloc&)const =default;
13+
constexprbooloperator!=(const bump_alloc&)const =default;
1114
bump_alloc() =default;
1215
template<classU>bump_alloc(const U&) {}
1316
T*allocate(size_t n) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp