the return value of difference_type function in iterator.h is difference_type*

This commit is contained in:
jxd134
2016-02-26 20:33:52 +08:00
parent bfbcd808d8
commit 1783d7df58
2 changed files with 3 additions and 1 deletions

View File

@@ -1,9 +1,11 @@
#include "../Alloc.h"
namespace TinySTL{
char *alloc::start_free = 0;
char *alloc::end_free = 0;
size_t alloc::heap_size = 0;
alloc::obj *alloc::free_list[alloc::ENFreeLists::NFREELISTS] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};

View File

@@ -101,7 +101,7 @@ namespace TinySTL{
return static_cast<typename iterator_traits<Iterator>::value_type*>(0);
}
template<class Iterator>
inline typename iterator_traits<Iterator>::difference_type
inline typename iterator_traits<Iterator>::difference_type*
difference_type(const Iterator& It){
return static_cast<typename iterator_traits<Iterator>::difference_type*>(0);
}