5
5
#ifndef BITCOIN_PREVECTOR_H
6
6
#define BITCOIN_PREVECTOR_H
7
7
8
- #include < assert.h>
9
- #include < cstdlib>
10
- #include < stdint.h>
11
- #include < string.h>
12
-
13
8
#include < algorithm>
9
+ #include < cassert>
14
10
#include < cstddef>
11
+ #include < cstdint>
12
+ #include < cstdlib>
13
+ #include < cstring>
14
+ #include < iterator>
15
15
#include < type_traits>
16
16
#include < utility>
17
17
@@ -210,7 +210,7 @@ class prevector {
210
210
std::fill_n (dst, count, value);
211
211
}
212
212
213
- template < typename InputIterator>
213
+ template <std::input_iterator InputIterator>
214
214
void fill (T* dst, InputIterator first, InputIterator last) {
215
215
while (first != last) {
216
216
new (static_cast <void *>(dst)) T (*first);
@@ -229,7 +229,7 @@ class prevector {
229
229
fill (item_ptr (0 ), n, val);
230
230
}
231
231
232
- template < typename InputIterator>
232
+ template <std::input_iterator InputIterator>
233
233
void assign (InputIterator first, InputIterator last) {
234
234
size_type n = last - first;
235
235
clear ();
@@ -252,7 +252,7 @@ class prevector {
252
252
fill (item_ptr (0 ), n, val);
253
253
}
254
254
255
- template < typename InputIterator>
255
+ template <std::input_iterator InputIterator>
256
256
prevector (InputIterator first, InputIterator last) {
257
257
size_type n = last - first;
258
258
change_capacity (n);
@@ -381,7 +381,7 @@ class prevector {
381
381
fill (item_ptr (p), count, value);
382
382
}
383
383
384
- template < typename InputIterator>
384
+ template <std::input_iterator InputIterator>
385
385
void insert (iterator pos, InputIterator first, InputIterator last) {
386
386
size_type p = pos - begin ();
387
387
difference_type count = last - first;
0 commit comments