This commit is contained in:
zhanglanqing
2016-05-28 11:35:10 +08:00
parent 6ca8fa8c7e
commit 550ae0bbc7

View File

@@ -22,15 +22,15 @@ namespace TinySTL{
template<class ForwardIterator>
inline void _destroy(ForwardIterator first, ForwardIterator last, _false_type){
for (; , first != last; ++first){
for (; first != last; ++first){
destroy(&*first);
}
}
template<class ForwardIterator>
inline void destroy(ForwardIterator first, ForwardIterator last){
typedef typename _type_traits<T>::is_POD_type is_POD_type;
_destroy(first, last, is_POD_type);
typedef typename _type_traits<ForwardIterator>::is_POD_type is_POD_type;
_destroy(first, last, is_POD_type());
}
}