Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

空间配置器中的 allocator 是什么,并没有找到上下文 #6

Open
muyuuuu opened this issue Jul 15, 2024 · 1 comment
Open

Comments

@muyuuuu
Copy link

muyuuuu commented Jul 15, 2024

https://github.com/FunctionDou/STL/blob/master/1%20%E5%88%9D%E6%AC%A1%E6%8E%A5%E8%A7%A6%E7%A9%BA%E9%97%B4%E9%85%8D%E7%BD%AE%E5%99%A8.md

如下所示的代码:

const int N = 4;
int main()
{
	allocator<string>  alloc;
	auto str_ve = alloc.allocate(N);
@muyuuuu
Copy link
Author

muyuuuu commented Jul 15, 2024

好像知道了,自己造了一个类实现了一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant