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中destroy()函数以及Construct.h中destroy()函数的疑问 #26

Open
TJUSsr opened this issue May 8, 2018 · 0 comments

Comments

@TJUSsr
Copy link

TJUSsr commented May 8, 2018

Allocator中destroy()函数没有对数据类型做萃取,全都调用了析构函数进行了析构,是不是需要结合Construct.h中destroy()函数对数据类型进行萃取之后再destroy().

还有一个问题就是Construct.h中destroy()函数直接
template <class ForwardIt> inline void destroy(ForwardIt first,ForwardIt last){ typedef typename _type_traits<ForwardIt>::is_POD_type is_POD_type; _destroy(first,last,is_POD_type()); }这样写是不是有点问题,是不是需要先萃取ForwardIt的value_type再_type_traits<>

一点小小的疑问

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