Merge pull request #17 from zhanglanqing/master

bug fix
This commit is contained in:
zouxiaohang
2016-05-28 14:52:30 +08:00

View File

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