We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
vector.h中:allocator_type get_allocator() { return data_allocator(); } list.h中:allocator_type get_allocator() { return node_allocator(); } deque.h中:allocator_type get_allocator() { return allocator_type(); } 为什么函数返回值类型都是allocator_type,但是函数体中 return 的确是不同的对象呢?
The text was updated successfully, but these errors were encountered:
目前这个区别没有意义。 MyTinySTL 的容器只支持自己的 mystl::allocator ,而同系列的分配器都能彼此间相互隐式转换。
mystl::allocator
Sorry, something went wrong.
No branches or pull requests
vector.h中:allocator_type get_allocator() { return data_allocator(); }
list.h中:allocator_type get_allocator() { return node_allocator(); }
deque.h中:allocator_type get_allocator() { return allocator_type(); }
为什么函数返回值类型都是allocator_type,但是函数体中 return 的确是不同的对象呢?
The text was updated successfully, but these errors were encountered: