Bitcoin Core Fuzz Coverage Report

Coverage Report

Created: 2026-05-28 15:05

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/Users/brunogarcia/projects/bitcoin-core-dev/src/prevector.h
Line
Count
Source
1
// Copyright (c) 2015-present The Bitcoin Core developers
2
// Distributed under the MIT software license, see the accompanying
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5
#ifndef BITCOIN_PREVECTOR_H
6
#define BITCOIN_PREVECTOR_H
7
8
#include <algorithm>
9
#include <cassert>
10
#include <cstddef>
11
#include <cstdint>
12
#include <cstdlib>
13
#include <cstring>
14
#include <iterator>
15
#include <type_traits>
16
#include <utility>
17
18
/** Implements a drop-in replacement for std::vector<T> which stores up to N
19
 *  elements directly (without heap allocation). The types Size and Diff are
20
 *  used to store element counts, and can be any unsigned + signed type.
21
 *
22
 *  Storage layout is either:
23
 *  - Direct allocation:
24
 *    - Size _size: the number of used elements (between 0 and N)
25
 *    - T direct[N]: an array of N elements of type T
26
 *      (only the first _size are initialized).
27
 *  - Indirect allocation:
28
 *    - Size _size: the number of used elements plus N + 1
29
 *    - Size capacity: the number of allocated elements
30
 *    - T* indirect: a pointer to an array of capacity elements of type T
31
 *      (only the first _size are initialized).
32
 *
33
 *  The data type T must be movable by memmove/realloc(). Once we switch to C++,
34
 *  move constructors can be used instead.
35
 */
36
template<unsigned int N, typename T, typename Size = uint32_t, typename Diff = int32_t>
37
class prevector {
38
    static_assert(std::is_trivially_copyable_v<T>);
39
40
public:
41
    static constexpr unsigned int STATIC_SIZE{N};
42
43
    typedef Size size_type;
44
    typedef Diff difference_type;
45
    typedef T value_type;
46
    typedef value_type& reference;
47
    typedef const value_type& const_reference;
48
    typedef value_type* pointer;
49
    typedef const value_type* const_pointer;
50
51
    class iterator {
52
        T* ptr{};
53
    public:
54
        typedef Diff difference_type;
55
        typedef T* pointer;
56
        typedef T& reference;
57
        using element_type = T;
58
        using iterator_category = std::contiguous_iterator_tag;
59
        iterator() = default;
60
131k
        iterator(T* ptr_) : ptr(ptr_) {}
prevector<16u, unsigned char, unsigned int, int>::iterator::iterator(unsigned char*)
Line
Count
Source
60
15.3k
        iterator(T* ptr_) : ptr(ptr_) {}
prevector<36u, unsigned char, unsigned int, int>::iterator::iterator(unsigned char*)
Line
Count
Source
60
115k
        iterator(T* ptr_) : ptr(ptr_) {}
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::iterator::iterator(int*)
Unexecuted instantiation: prevector<33u, unsigned char, unsigned int, int>::iterator::iterator(unsigned char*)
prevector<35u, unsigned char, unsigned int, int>::iterator::iterator(unsigned char*)
Line
Count
Source
60
292
        iterator(T* ptr_) : ptr(ptr_) {}
61
124k
        T& operator*() const { return *ptr; }
prevector<36u, unsigned char, unsigned int, int>::iterator::operator*() const
Line
Count
Source
61
93.1k
        T& operator*() const { return *ptr; }
prevector<16u, unsigned char, unsigned int, int>::iterator::operator*() const
Line
Count
Source
61
30.7k
        T& operator*() const { return *ptr; }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::iterator::operator*() const
Unexecuted instantiation: prevector<33u, unsigned char, unsigned int, int>::iterator::operator*() const
prevector<35u, unsigned char, unsigned int, int>::iterator::operator*() const
Line
Count
Source
61
292
        T& operator*() const { return *ptr; }
62
0
        T* operator->() const { return ptr; }
63
        T& operator[](size_type pos) const { return ptr[pos]; }
64
0
        iterator& operator++() { ptr++; return *this; }
65
        iterator& operator--() { ptr--; return *this; }
66
        iterator operator++(int) { iterator copy(*this); ++(*this); return copy; }
67
        iterator operator--(int) { iterator copy(*this); --(*this); return copy; }
68
51.0k
        difference_type friend operator-(iterator a, iterator b) { return (&(*a) - &(*b)); }
operator-(prevector<36u, unsigned char, unsigned int, int>::iterator, prevector<36u, unsigned char, unsigned int, int>::iterator)
Line
Count
Source
68
45.8k
        difference_type friend operator-(iterator a, iterator b) { return (&(*a) - &(*b)); }
operator-(prevector<16u, unsigned char, unsigned int, int>::iterator, prevector<16u, unsigned char, unsigned int, int>::iterator)
Line
Count
Source
68
5.12k
        difference_type friend operator-(iterator a, iterator b) { return (&(*a) - &(*b)); }
Unexecuted instantiation: operator-(prevector<8u, int, unsigned int, int>::iterator, prevector<8u, int, unsigned int, int>::iterator)
Unexecuted instantiation: operator-(prevector<33u, unsigned char, unsigned int, int>::iterator, prevector<33u, unsigned char, unsigned int, int>::iterator)
operator-(prevector<35u, unsigned char, unsigned int, int>::iterator, prevector<35u, unsigned char, unsigned int, int>::iterator)
Line
Count
Source
68
146
        difference_type friend operator-(iterator a, iterator b) { return (&(*a) - &(*b)); }
69
0
        iterator operator+(size_type n) const { return iterator(ptr + n); }
Unexecuted instantiation: prevector<36u, unsigned char, unsigned int, int>::iterator::operator+(unsigned int) const
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::iterator::operator+(unsigned int) const
Unexecuted instantiation: prevector<33u, unsigned char, unsigned int, int>::iterator::operator+(unsigned int) const
70
        iterator friend operator+(size_type n, iterator x) { return x + n; }
71
        iterator& operator+=(size_type n) { ptr += n; return *this; }
72
0
        iterator operator-(size_type n) const { return iterator(ptr - n); }
73
        iterator& operator-=(size_type n) { ptr -= n; return *this; }
74
0
        bool operator==(iterator x) const { return ptr == x.ptr; }
75
0
        auto operator<=>(iterator x) const { return ptr <=> x.ptr; }
Unexecuted instantiation: prevector<33u, unsigned char, unsigned int, int>::iterator::operator<=>(prevector<33u, unsigned char, unsigned int, int>::iterator) const
Unexecuted instantiation: prevector<36u, unsigned char, unsigned int, int>::iterator::operator<=>(prevector<36u, unsigned char, unsigned int, int>::iterator) const
Unexecuted instantiation: prevector<16u, unsigned char, unsigned int, int>::iterator::operator<=>(prevector<16u, unsigned char, unsigned int, int>::iterator) const
Unexecuted instantiation: prevector<35u, unsigned char, unsigned int, int>::iterator::operator<=>(prevector<35u, unsigned char, unsigned int, int>::iterator) const
76
    };
77
78
    class const_iterator {
79
        const T* ptr{};
80
    public:
81
        typedef Diff difference_type;
82
        typedef const T* pointer;
83
        typedef const T& reference;
84
        using element_type = const T;
85
        using iterator_category = std::contiguous_iterator_tag;
86
        const_iterator() = default;
87
116k
        const_iterator(const T* ptr_) : ptr(ptr_) {}
prevector<16u, unsigned char, unsigned int, int>::const_iterator::const_iterator(unsigned char const*)
Line
Count
Source
87
60.5k
        const_iterator(const T* ptr_) : ptr(ptr_) {}
prevector<36u, unsigned char, unsigned int, int>::const_iterator::const_iterator(unsigned char const*)
Line
Count
Source
87
55.5k
        const_iterator(const T* ptr_) : ptr(ptr_) {}
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::const_iterator::const_iterator(int const*)
88
0
        const_iterator(iterator x) : ptr(&(*x)) {}
89
2.65M
        const T& operator*() const { return *ptr; }
prevector<36u, unsigned char, unsigned int, int>::const_iterator::operator*() const
Line
Count
Source
89
2.34M
        const T& operator*() const { return *ptr; }
prevector<16u, unsigned char, unsigned int, int>::const_iterator::operator*() const
Line
Count
Source
89
312k
        const T& operator*() const { return *ptr; }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::const_iterator::operator*() const
90
14.8k
        const T* operator->() const { return ptr; }
Unexecuted instantiation: prevector<36u, unsigned char, unsigned int, int>::const_iterator::operator->() const
prevector<16u, unsigned char, unsigned int, int>::const_iterator::operator->() const
Line
Count
Source
90
14.8k
        const T* operator->() const { return ptr; }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::const_iterator::operator->() const
91
0
        const T& operator[](size_type pos) const { return ptr[pos]; }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::const_iterator::operator[](unsigned int) const
Unexecuted instantiation: prevector<36u, unsigned char, unsigned int, int>::const_iterator::operator[](unsigned int) const
92
2.63M
        const_iterator& operator++() { ptr++; return *this; }
prevector<36u, unsigned char, unsigned int, int>::const_iterator::operator++()
Line
Count
Source
92
2.32M
        const_iterator& operator++() { ptr++; return *this; }
prevector<16u, unsigned char, unsigned int, int>::const_iterator::operator++()
Line
Count
Source
92
310k
        const_iterator& operator++() { ptr++; return *this; }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::const_iterator::operator++()
93
0
        const_iterator& operator--() { ptr--; return *this; }
94
0
        const_iterator operator++(int) { const_iterator copy(*this); ++(*this); return copy; }
95
        const_iterator operator--(int) { const_iterator copy(*this); --(*this); return copy; }
96
12.8k
        difference_type friend operator-(const_iterator a, const_iterator b) { return (&(*a) - &(*b)); }
operator-(prevector<16u, unsigned char, unsigned int, int>::const_iterator, prevector<16u, unsigned char, unsigned int, int>::const_iterator)
Line
Count
Source
96
870
        difference_type friend operator-(const_iterator a, const_iterator b) { return (&(*a) - &(*b)); }
operator-(prevector<36u, unsigned char, unsigned int, int>::const_iterator, prevector<36u, unsigned char, unsigned int, int>::const_iterator)
Line
Count
Source
96
12.0k
        difference_type friend operator-(const_iterator a, const_iterator b) { return (&(*a) - &(*b)); }
Unexecuted instantiation: operator-(prevector<8u, int, unsigned int, int>::const_iterator, prevector<8u, int, unsigned int, int>::const_iterator)
97
0
        const_iterator operator+(size_type n) const { return const_iterator(ptr + n); }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::const_iterator::operator+(unsigned int) const
Unexecuted instantiation: prevector<36u, unsigned char, unsigned int, int>::const_iterator::operator+(unsigned int) const
98
        const_iterator friend operator+(size_type n, const_iterator x) { return x + n; }
99
0
        const_iterator& operator+=(size_type n) { ptr += n; return *this; }
100
0
        const_iterator operator-(size_type n) const { return const_iterator(ptr - n); }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::const_iterator::operator-(unsigned int) const
Unexecuted instantiation: prevector<36u, unsigned char, unsigned int, int>::const_iterator::operator-(unsigned int) const
101
        const_iterator& operator-=(size_type n) { ptr -= n; return *this; }
102
2.68M
        bool operator==(const_iterator x) const { return ptr == x.ptr; }
prevector<36u, unsigned char, unsigned int, int>::const_iterator::operator==(prevector<36u, unsigned char, unsigned int, int>::const_iterator) const
Line
Count
Source
102
2.35M
        bool operator==(const_iterator x) const { return ptr == x.ptr; }
prevector<16u, unsigned char, unsigned int, int>::const_iterator::operator==(prevector<16u, unsigned char, unsigned int, int>::const_iterator) const
Line
Count
Source
102
333k
        bool operator==(const_iterator x) const { return ptr == x.ptr; }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::const_iterator::operator==(prevector<8u, int, unsigned int, int>::const_iterator) const
103
0
        auto operator<=>(const_iterator x) const { return ptr <=> x.ptr; }
Unexecuted instantiation: prevector<36u, unsigned char, unsigned int, int>::const_iterator::operator<=>(prevector<36u, unsigned char, unsigned int, int>::const_iterator) const
Unexecuted instantiation: prevector<16u, unsigned char, unsigned int, int>::const_iterator::operator<=>(prevector<16u, unsigned char, unsigned int, int>::const_iterator) const
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::const_iterator::operator<=>(prevector<8u, int, unsigned int, int>::const_iterator) const
104
    };
105
106
private:
107
#pragma pack(push, 1)
108
    union direct_or_indirect {
109
        char direct[sizeof(T) * N];
110
        struct {
111
            char* indirect;
112
            size_type capacity;
113
        } indirect_contents;
114
    };
115
#pragma pack(pop)
116
    alignas(char*) direct_or_indirect _union = {};
117
    size_type _size = 0;
118
119
    static_assert(alignof(char*) % alignof(size_type) == 0 && sizeof(char*) % alignof(size_type) == 0, "size_type cannot have more restrictive alignment requirement than pointer");
120
    static_assert(alignof(char*) % alignof(T) == 0, "value_type T cannot have more restrictive alignment requirement than pointer");
121
122
120k
    T* direct_ptr(difference_type pos) { return reinterpret_cast<T*>(_union.direct) + pos; }
prevector<36u, unsigned char, unsigned int, int>::direct_ptr(int)
Line
Count
Source
122
57.5k
    T* direct_ptr(difference_type pos) { return reinterpret_cast<T*>(_union.direct) + pos; }
Unexecuted instantiation: prevector<33u, unsigned char, unsigned int, int>::direct_ptr(int)
prevector<16u, unsigned char, unsigned int, int>::direct_ptr(int)
Line
Count
Source
122
62.8k
    T* direct_ptr(difference_type pos) { return reinterpret_cast<T*>(_union.direct) + pos; }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::direct_ptr(int)
prevector<35u, unsigned char, unsigned int, int>::direct_ptr(int)
Line
Count
Source
122
584
    T* direct_ptr(difference_type pos) { return reinterpret_cast<T*>(_union.direct) + pos; }
Unexecuted instantiation: prevector<4u, Network, unsigned int, int>::direct_ptr(int)
123
128k
    const T* direct_ptr(difference_type pos) const { return reinterpret_cast<const T*>(_union.direct) + pos; }
prevector<36u, unsigned char, unsigned int, int>::direct_ptr(int) const
Line
Count
Source
123
56.7k
    const T* direct_ptr(difference_type pos) const { return reinterpret_cast<const T*>(_union.direct) + pos; }
prevector<16u, unsigned char, unsigned int, int>::direct_ptr(int) const
Line
Count
Source
123
71.3k
    const T* direct_ptr(difference_type pos) const { return reinterpret_cast<const T*>(_union.direct) + pos; }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::direct_ptr(int) const
Unexecuted instantiation: prevector<33u, unsigned char, unsigned int, int>::direct_ptr(int) const
124
121k
    T* indirect_ptr(difference_type pos) { return reinterpret_cast<T*>(_union.indirect_contents.indirect) + pos; }
prevector<36u, unsigned char, unsigned int, int>::indirect_ptr(int)
Line
Count
Source
124
115k
    T* indirect_ptr(difference_type pos) { return reinterpret_cast<T*>(_union.indirect_contents.indirect) + pos; }
Unexecuted instantiation: prevector<33u, unsigned char, unsigned int, int>::indirect_ptr(int)
prevector<16u, unsigned char, unsigned int, int>::indirect_ptr(int)
Line
Count
Source
124
5.29k
    T* indirect_ptr(difference_type pos) { return reinterpret_cast<T*>(_union.indirect_contents.indirect) + pos; }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::indirect_ptr(int)
Unexecuted instantiation: prevector<35u, unsigned char, unsigned int, int>::indirect_ptr(int)
Unexecuted instantiation: prevector<4u, Network, unsigned int, int>::indirect_ptr(int)
125
15.0k
    const T* indirect_ptr(difference_type pos) const { return reinterpret_cast<const T*>(_union.indirect_contents.indirect) + pos; }
prevector<36u, unsigned char, unsigned int, int>::indirect_ptr(int) const
Line
Count
Source
125
7.81k
    const T* indirect_ptr(difference_type pos) const { return reinterpret_cast<const T*>(_union.indirect_contents.indirect) + pos; }
prevector<16u, unsigned char, unsigned int, int>::indirect_ptr(int) const
Line
Count
Source
125
7.24k
    const T* indirect_ptr(difference_type pos) const { return reinterpret_cast<const T*>(_union.indirect_contents.indirect) + pos; }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::indirect_ptr(int) const
Unexecuted instantiation: prevector<33u, unsigned char, unsigned int, int>::indirect_ptr(int) const
126
943k
    bool is_direct() const { return _size <= N; }
prevector<36u, unsigned char, unsigned int, int>::is_direct() const
Line
Count
Source
126
615k
    bool is_direct() const { return _size <= N; }
Unexecuted instantiation: prevector<33u, unsigned char, unsigned int, int>::is_direct() const
prevector<16u, unsigned char, unsigned int, int>::is_direct() const
Line
Count
Source
126
326k
    bool is_direct() const { return _size <= N; }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::is_direct() const
prevector<35u, unsigned char, unsigned int, int>::is_direct() const
Line
Count
Source
126
1.38k
    bool is_direct() const { return _size <= N; }
Unexecuted instantiation: prevector<4u, Network, unsigned int, int>::is_direct() const
127
128
65.1k
    void change_capacity(size_type new_capacity) {
129
65.1k
        if (new_capacity <= N) {
130
52.2k
            if (!is_direct()) {
131
321
                T* indirect = indirect_ptr(0);
132
321
                T* src = indirect;
133
321
                T* dst = direct_ptr(0);
134
321
                memcpy(dst, src, size() * sizeof(T));
135
321
                free(indirect);
136
321
                _size -= N + 1;
137
321
            }
138
52.2k
        } else {
139
12.9k
            if (!is_direct()) {
140
                /* FIXME: Because malloc/realloc here won't call new_handler if allocation fails, assert
141
                    success. These should instead use an allocator or new/delete so that handlers
142
                    are called as necessary, but performance would be slightly degraded by doing so. */
143
4.04k
                _union.indirect_contents.indirect = static_cast<char*>(realloc(_union.indirect_contents.indirect, ((size_t)sizeof(T)) * new_capacity));
144
4.04k
                assert(_union.indirect_contents.indirect);
145
4.04k
                _union.indirect_contents.capacity = new_capacity;
146
8.87k
            } else {
147
8.87k
                char* new_indirect = static_cast<char*>(malloc(((size_t)sizeof(T)) * new_capacity));
148
8.87k
                assert(new_indirect);
149
8.87k
                T* src = direct_ptr(0);
150
8.87k
                T* dst = reinterpret_cast<T*>(new_indirect);
151
8.87k
                memcpy(dst, src, size() * sizeof(T));
152
8.87k
                _union.indirect_contents.indirect = new_indirect;
153
8.87k
                _union.indirect_contents.capacity = new_capacity;
154
8.87k
                _size += N + 1;
155
8.87k
            }
156
12.9k
        }
157
65.1k
    }
prevector<36u, unsigned char, unsigned int, int>::change_capacity(unsigned int)
Line
Count
Source
128
23.6k
    void change_capacity(size_type new_capacity) {
129
23.6k
        if (new_capacity <= N) {
130
14.9k
            if (!is_direct()) {
131
321
                T* indirect = indirect_ptr(0);
132
321
                T* src = indirect;
133
321
                T* dst = direct_ptr(0);
134
321
                memcpy(dst, src, size() * sizeof(T));
135
321
                free(indirect);
136
321
                _size -= N + 1;
137
321
            }
138
14.9k
        } else {
139
8.67k
            if (!is_direct()) {
140
                /* FIXME: Because malloc/realloc here won't call new_handler if allocation fails, assert
141
                    success. These should instead use an allocator or new/delete so that handlers
142
                    are called as necessary, but performance would be slightly degraded by doing so. */
143
4.04k
                _union.indirect_contents.indirect = static_cast<char*>(realloc(_union.indirect_contents.indirect, ((size_t)sizeof(T)) * new_capacity));
144
4.04k
                assert(_union.indirect_contents.indirect);
145
4.04k
                _union.indirect_contents.capacity = new_capacity;
146
4.63k
            } else {
147
4.63k
                char* new_indirect = static_cast<char*>(malloc(((size_t)sizeof(T)) * new_capacity));
148
4.63k
                assert(new_indirect);
149
4.63k
                T* src = direct_ptr(0);
150
4.63k
                T* dst = reinterpret_cast<T*>(new_indirect);
151
4.63k
                memcpy(dst, src, size() * sizeof(T));
152
4.63k
                _union.indirect_contents.indirect = new_indirect;
153
4.63k
                _union.indirect_contents.capacity = new_capacity;
154
4.63k
                _size += N + 1;
155
4.63k
            }
156
8.67k
        }
157
23.6k
    }
prevector<16u, unsigned char, unsigned int, int>::change_capacity(unsigned int)
Line
Count
Source
128
41.4k
    void change_capacity(size_type new_capacity) {
129
41.4k
        if (new_capacity <= N) {
130
37.2k
            if (!is_direct()) {
131
0
                T* indirect = indirect_ptr(0);
132
0
                T* src = indirect;
133
0
                T* dst = direct_ptr(0);
134
0
                memcpy(dst, src, size() * sizeof(T));
135
0
                free(indirect);
136
0
                _size -= N + 1;
137
0
            }
138
37.2k
        } else {
139
4.24k
            if (!is_direct()) {
140
                /* FIXME: Because malloc/realloc here won't call new_handler if allocation fails, assert
141
                    success. These should instead use an allocator or new/delete so that handlers
142
                    are called as necessary, but performance would be slightly degraded by doing so. */
143
0
                _union.indirect_contents.indirect = static_cast<char*>(realloc(_union.indirect_contents.indirect, ((size_t)sizeof(T)) * new_capacity));
144
0
                assert(_union.indirect_contents.indirect);
145
0
                _union.indirect_contents.capacity = new_capacity;
146
4.24k
            } else {
147
4.24k
                char* new_indirect = static_cast<char*>(malloc(((size_t)sizeof(T)) * new_capacity));
148
4.24k
                assert(new_indirect);
149
4.24k
                T* src = direct_ptr(0);
150
4.24k
                T* dst = reinterpret_cast<T*>(new_indirect);
151
4.24k
                memcpy(dst, src, size() * sizeof(T));
152
4.24k
                _union.indirect_contents.indirect = new_indirect;
153
4.24k
                _union.indirect_contents.capacity = new_capacity;
154
4.24k
                _size += N + 1;
155
4.24k
            }
156
4.24k
        }
157
41.4k
    }
Unexecuted instantiation: prevector<33u, unsigned char, unsigned int, int>::change_capacity(unsigned int)
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::change_capacity(unsigned int)
prevector<35u, unsigned char, unsigned int, int>::change_capacity(unsigned int)
Line
Count
Source
128
73
    void change_capacity(size_type new_capacity) {
129
73
        if (new_capacity <= N) {
130
73
            if (!is_direct()) {
131
0
                T* indirect = indirect_ptr(0);
132
0
                T* src = indirect;
133
0
                T* dst = direct_ptr(0);
134
0
                memcpy(dst, src, size() * sizeof(T));
135
0
                free(indirect);
136
0
                _size -= N + 1;
137
0
            }
138
73
        } else {
139
0
            if (!is_direct()) {
140
                /* FIXME: Because malloc/realloc here won't call new_handler if allocation fails, assert
141
                    success. These should instead use an allocator or new/delete so that handlers
142
                    are called as necessary, but performance would be slightly degraded by doing so. */
143
0
                _union.indirect_contents.indirect = static_cast<char*>(realloc(_union.indirect_contents.indirect, ((size_t)sizeof(T)) * new_capacity));
144
0
                assert(_union.indirect_contents.indirect);
145
0
                _union.indirect_contents.capacity = new_capacity;
146
0
            } else {
147
0
                char* new_indirect = static_cast<char*>(malloc(((size_t)sizeof(T)) * new_capacity));
148
0
                assert(new_indirect);
149
0
                T* src = direct_ptr(0);
150
0
                T* dst = reinterpret_cast<T*>(new_indirect);
151
0
                memcpy(dst, src, size() * sizeof(T));
152
0
                _union.indirect_contents.indirect = new_indirect;
153
0
                _union.indirect_contents.capacity = new_capacity;
154
0
                _size += N + 1;
155
0
            }
156
0
        }
157
73
    }
Unexecuted instantiation: prevector<4u, Network, unsigned int, int>::change_capacity(unsigned int)
158
159
232k
    T* item_ptr(difference_type pos) { return is_direct() ? 
direct_ptr(pos)111k
:
indirect_ptr(pos)120k
; }
prevector<36u, unsigned char, unsigned int, int>::item_ptr(int)
Line
Count
Source
159
167k
    T* item_ptr(difference_type pos) { return is_direct() ? 
direct_ptr(pos)52.5k
:
indirect_ptr(pos)115k
; }
Unexecuted instantiation: prevector<33u, unsigned char, unsigned int, int>::item_ptr(int)
prevector<16u, unsigned char, unsigned int, int>::item_ptr(int)
Line
Count
Source
159
63.8k
    T* item_ptr(difference_type pos) { return is_direct() ? 
direct_ptr(pos)58.5k
:
indirect_ptr(pos)5.29k
; }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::item_ptr(int)
prevector<35u, unsigned char, unsigned int, int>::item_ptr(int)
Line
Count
Source
159
584
    T* item_ptr(difference_type pos) { return is_direct() ? direct_ptr(pos) : 
indirect_ptr(pos)0
; }
Unexecuted instantiation: prevector<4u, Network, unsigned int, int>::item_ptr(int)
160
143k
    const T* item_ptr(difference_type pos) const { return is_direct() ? 
direct_ptr(pos)128k
:
indirect_ptr(pos)15.0k
; }
prevector<36u, unsigned char, unsigned int, int>::item_ptr(int) const
Line
Count
Source
160
64.5k
    const T* item_ptr(difference_type pos) const { return is_direct() ? 
direct_ptr(pos)56.7k
:
indirect_ptr(pos)7.81k
; }
prevector<16u, unsigned char, unsigned int, int>::item_ptr(int) const
Line
Count
Source
160
78.6k
    const T* item_ptr(difference_type pos) const { return is_direct() ? 
direct_ptr(pos)71.3k
:
indirect_ptr(pos)7.24k
; }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::item_ptr(int) const
Unexecuted instantiation: prevector<33u, unsigned char, unsigned int, int>::item_ptr(int) const
161
162
19.4k
    void fill(T* dst, ptrdiff_t count, const T& value = T{}) {
163
19.4k
        std::fill_n(dst, count, value);
164
19.4k
    }
Unexecuted instantiation: prevector<36u, unsigned char, unsigned int, int>::fill(unsigned char*, long, unsigned char const&)
prevector<16u, unsigned char, unsigned int, int>::fill(unsigned char*, long, unsigned char const&)
Line
Count
Source
162
19.4k
    void fill(T* dst, ptrdiff_t count, const T& value = T{}) {
163
19.4k
        std::fill_n(dst, count, value);
164
19.4k
    }
Unexecuted instantiation: prevector<33u, unsigned char, unsigned int, int>::fill(unsigned char*, long, unsigned char const&)
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::fill(int*, long, int const&)
165
166
    template <std::input_iterator InputIterator>
167
74.0k
    void fill(T* dst, InputIterator first, InputIterator last) {
168
3.86M
        while (first != last) {
169
3.78M
            new(static_cast<void*>(dst)) T(*first);
170
3.78M
            ++dst;
171
3.78M
            ++first;
172
3.78M
        }
173
74.0k
    }
Unexecuted instantiation: void prevector<36u, unsigned char, unsigned int, int>::fill<unsigned char const*>(unsigned char*, unsigned char const*, unsigned char const*)
void prevector<36u, unsigned char, unsigned int, int>::fill<std::__1::__wrap_iter<unsigned char const*>>(unsigned char*, std::__1::__wrap_iter<unsigned char const*>, std::__1::__wrap_iter<unsigned char const*>)
Line
Count
Source
167
16.3k
    void fill(T* dst, InputIterator first, InputIterator last) {
168
903k
        while (first != last) {
169
886k
            new(static_cast<void*>(dst)) T(*first);
170
886k
            ++dst;
171
886k
            ++first;
172
886k
        }
173
16.3k
    }
void prevector<36u, unsigned char, unsigned int, int>::fill<prevector<36u, unsigned char, unsigned int, int>::const_iterator>(unsigned char*, prevector<36u, unsigned char, unsigned int, int>::const_iterator, prevector<36u, unsigned char, unsigned int, int>::const_iterator)
Line
Count
Source
167
27.7k
    void fill(T* dst, InputIterator first, InputIterator last) {
168
2.35M
        while (first != last) {
169
2.32M
            new(static_cast<void*>(dst)) T(*first);
170
2.32M
            ++dst;
171
2.32M
            ++first;
172
2.32M
        }
173
27.7k
    }
void prevector<16u, unsigned char, unsigned int, int>::fill<prevector<16u, unsigned char, unsigned int, int>::const_iterator>(unsigned char*, prevector<16u, unsigned char, unsigned int, int>::const_iterator, prevector<16u, unsigned char, unsigned int, int>::const_iterator)
Line
Count
Source
167
22.8k
    void fill(T* dst, InputIterator first, InputIterator last) {
168
333k
        while (first != last) {
169
310k
            new(static_cast<void*>(dst)) T(*first);
170
310k
            ++dst;
171
310k
            ++first;
172
310k
        }
173
22.8k
    }
Unexecuted instantiation: void prevector<36u, unsigned char, unsigned int, int>::fill<prevector<36u, unsigned char, unsigned int, int>::iterator>(unsigned char*, prevector<36u, unsigned char, unsigned int, int>::iterator, prevector<36u, unsigned char, unsigned int, int>::iterator)
Unexecuted instantiation: void prevector<8u, int, unsigned int, int>::fill<int*>(int*, int*, int*)
Unexecuted instantiation: void prevector<8u, int, unsigned int, int>::fill<prevector<8u, int, unsigned int, int>::const_iterator>(int*, prevector<8u, int, unsigned int, int>::const_iterator, prevector<8u, int, unsigned int, int>::const_iterator)
Unexecuted instantiation: void prevector<8u, int, unsigned int, int>::fill<std::__1::__wrap_iter<int const*>>(int*, std::__1::__wrap_iter<int const*>, std::__1::__wrap_iter<int const*>)
Unexecuted instantiation: void prevector<33u, unsigned char, unsigned int, int>::fill<std::__1::__wrap_iter<unsigned char const*>>(unsigned char*, std::__1::__wrap_iter<unsigned char const*>, std::__1::__wrap_iter<unsigned char const*>)
void prevector<36u, unsigned char, unsigned int, int>::fill<std::__1::__wrap_iter<unsigned char*>>(unsigned char*, std::__1::__wrap_iter<unsigned char*>, std::__1::__wrap_iter<unsigned char*>)
Line
Count
Source
167
5.10k
    void fill(T* dst, InputIterator first, InputIterator last) {
168
248k
        while (first != last) {
169
242k
            new(static_cast<void*>(dst)) T(*first);
170
242k
            ++dst;
171
242k
            ++first;
172
242k
        }
173
5.10k
    }
void prevector<16u, unsigned char, unsigned int, int>::fill<std::__1::__wrap_iter<unsigned char const*>>(unsigned char*, std::__1::__wrap_iter<unsigned char const*>, std::__1::__wrap_iter<unsigned char const*>)
Line
Count
Source
167
1.24k
    void fill(T* dst, InputIterator first, InputIterator last) {
168
20.9k
        while (first != last) {
169
19.7k
            new(static_cast<void*>(dst)) T(*first);
170
19.7k
            ++dst;
171
19.7k
            ++first;
172
19.7k
        }
173
1.24k
    }
void prevector<16u, unsigned char, unsigned int, int>::fill<unsigned char*>(unsigned char*, unsigned char*, unsigned char*)
Line
Count
Source
167
420
    void fill(T* dst, InputIterator first, InputIterator last) {
168
4.62k
        while (first != last) {
169
4.20k
            new(static_cast<void*>(dst)) T(*first);
170
4.20k
            ++dst;
171
4.20k
            ++first;
172
4.20k
        }
173
420
    }
Unexecuted instantiation: void prevector<16u, unsigned char, unsigned int, int>::fill<std::__1::__wrap_iter<unsigned char*>>(unsigned char*, std::__1::__wrap_iter<unsigned char*>, std::__1::__wrap_iter<unsigned char*>)
Unexecuted instantiation: void prevector<16u, unsigned char, unsigned int, int>::fill<unsigned char const*>(unsigned char*, unsigned char const*, unsigned char const*)
void prevector<35u, unsigned char, unsigned int, int>::fill<std::__1::__wrap_iter<unsigned char const*>>(unsigned char*, std::__1::__wrap_iter<unsigned char const*>, std::__1::__wrap_iter<unsigned char const*>)
Line
Count
Source
167
73
    void fill(T* dst, InputIterator first, InputIterator last) {
168
2.40k
        while (first != last) {
169
2.33k
            new(static_cast<void*>(dst)) T(*first);
170
2.33k
            ++dst;
171
2.33k
            ++first;
172
2.33k
        }
173
73
    }
void prevector<35u, unsigned char, unsigned int, int>::fill<unsigned char*>(unsigned char*, unsigned char*, unsigned char*)
Line
Count
Source
167
73
    void fill(T* dst, InputIterator first, InputIterator last) {
168
219
        while (first != last) {
169
146
            new(static_cast<void*>(dst)) T(*first);
170
146
            ++dst;
171
146
            ++first;
172
146
        }
173
73
    }
void prevector<35u, unsigned char, unsigned int, int>::fill<unsigned char const*>(unsigned char*, unsigned char const*, unsigned char const*)
Line
Count
Source
167
73
    void fill(T* dst, InputIterator first, InputIterator last) {
168
146
        while (first != last) {
169
73
            new(static_cast<void*>(dst)) T(*first);
170
73
            ++dst;
171
73
            ++first;
172
73
        }
173
73
    }
174
175
public:
176
3
    void assign(size_type n, const T& val) {
177
3
        clear();
178
3
        if (capacity() < n) {
179
0
            change_capacity(n);
180
0
        }
181
3
        _size += n;
182
3
        fill(item_ptr(0), n, val);
183
3
    }
prevector<16u, unsigned char, unsigned int, int>::assign(unsigned int, unsigned char const&)
Line
Count
Source
176
3
    void assign(size_type n, const T& val) {
177
3
        clear();
178
3
        if (capacity() < n) {
179
0
            change_capacity(n);
180
0
        }
181
3
        _size += n;
182
3
        fill(item_ptr(0), n, val);
183
3
    }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::assign(unsigned int, int const&)
184
185
    template <std::input_iterator InputIterator>
186
14.5k
    void assign(InputIterator first, InputIterator last) {
187
14.5k
        size_type n = last - first;
188
14.5k
        clear();
189
14.5k
        if (capacity() < n) {
190
1.43k
            change_capacity(n);
191
1.43k
        }
192
14.5k
        _size += n;
193
14.5k
        fill(item_ptr(0), first, last);
194
14.5k
    }
void prevector<16u, unsigned char, unsigned int, int>::assign<prevector<16u, unsigned char, unsigned int, int>::const_iterator>(prevector<16u, unsigned char, unsigned int, int>::const_iterator, prevector<16u, unsigned char, unsigned int, int>::const_iterator)
Line
Count
Source
186
870
    void assign(InputIterator first, InputIterator last) {
187
870
        size_type n = last - first;
188
870
        clear();
189
870
        if (capacity() < n) {
190
0
            change_capacity(n);
191
0
        }
192
870
        _size += n;
193
870
        fill(item_ptr(0), first, last);
194
870
    }
void prevector<36u, unsigned char, unsigned int, int>::assign<prevector<36u, unsigned char, unsigned int, int>::const_iterator>(prevector<36u, unsigned char, unsigned int, int>::const_iterator, prevector<36u, unsigned char, unsigned int, int>::const_iterator)
Line
Count
Source
186
12.0k
    void assign(InputIterator first, InputIterator last) {
187
12.0k
        size_type n = last - first;
188
12.0k
        clear();
189
12.0k
        if (capacity() < n) {
190
1.43k
            change_capacity(n);
191
1.43k
        }
192
12.0k
        _size += n;
193
12.0k
        fill(item_ptr(0), first, last);
194
12.0k
    }
Unexecuted instantiation: void prevector<8u, int, unsigned int, int>::assign<prevector<8u, int, unsigned int, int>::const_iterator>(prevector<8u, int, unsigned int, int>::const_iterator, prevector<8u, int, unsigned int, int>::const_iterator)
Unexecuted instantiation: void prevector<33u, unsigned char, unsigned int, int>::assign<std::__1::__wrap_iter<unsigned char const*>>(std::__1::__wrap_iter<unsigned char const*>, std::__1::__wrap_iter<unsigned char const*>)
void prevector<16u, unsigned char, unsigned int, int>::assign<std::__1::__wrap_iter<unsigned char const*>>(std::__1::__wrap_iter<unsigned char const*>, std::__1::__wrap_iter<unsigned char const*>)
Line
Count
Source
186
1.24k
    void assign(InputIterator first, InputIterator last) {
187
1.24k
        size_type n = last - first;
188
1.24k
        clear();
189
1.24k
        if (capacity() < n) {
190
0
            change_capacity(n);
191
0
        }
192
1.24k
        _size += n;
193
1.24k
        fill(item_ptr(0), first, last);
194
1.24k
    }
void prevector<16u, unsigned char, unsigned int, int>::assign<unsigned char*>(unsigned char*, unsigned char*)
Line
Count
Source
186
420
    void assign(InputIterator first, InputIterator last) {
187
420
        size_type n = last - first;
188
420
        clear();
189
420
        if (capacity() < n) {
190
0
            change_capacity(n);
191
0
        }
192
420
        _size += n;
193
420
        fill(item_ptr(0), first, last);
194
420
    }
Unexecuted instantiation: void prevector<16u, unsigned char, unsigned int, int>::assign<std::__1::__wrap_iter<unsigned char*>>(std::__1::__wrap_iter<unsigned char*>, std::__1::__wrap_iter<unsigned char*>)
Unexecuted instantiation: void prevector<16u, unsigned char, unsigned int, int>::assign<unsigned char const*>(unsigned char const*, unsigned char const*)
195
196
20.2k
    prevector() = default;
prevector<36u, unsigned char, unsigned int, int>::prevector()
Line
Count
Source
196
20.2k
    prevector() = default;
Unexecuted instantiation: prevector<33u, unsigned char, unsigned int, int>::prevector()
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::prevector()
Unexecuted instantiation: prevector<4u, Network, unsigned int, int>::prevector()
197
198
    explicit prevector(size_type n) {
199
        resize(n);
200
    }
201
202
18.4k
    explicit prevector(size_type n, const T& val) {
203
18.4k
        change_capacity(n);
204
18.4k
        _size += n;
205
18.4k
        fill(item_ptr(0), n, val);
206
18.4k
    }
Unexecuted instantiation: prevector<33u, unsigned char, unsigned int, int>::prevector(unsigned int, unsigned char const&)
prevector<16u, unsigned char, unsigned int, int>::prevector(unsigned int, unsigned char const&)
Line
Count
Source
202
18.4k
    explicit prevector(size_type n, const T& val) {
203
18.4k
        change_capacity(n);
204
18.4k
        _size += n;
205
18.4k
        fill(item_ptr(0), n, val);
206
18.4k
    }
207
208
    template <std::input_iterator InputIterator>
209
73
    prevector(InputIterator first, InputIterator last) {
210
73
        size_type n = last - first;
211
73
        change_capacity(n);
212
73
        _size += n;
213
73
        fill(item_ptr(0), first, last);
214
73
    }
Unexecuted instantiation: prevector<36u, unsigned char, unsigned int, int>::prevector<std::__1::__wrap_iter<unsigned char const*>>(std::__1::__wrap_iter<unsigned char const*>, std::__1::__wrap_iter<unsigned char const*>)
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::prevector<std::__1::__wrap_iter<int const*>>(std::__1::__wrap_iter<int const*>, std::__1::__wrap_iter<int const*>)
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::prevector<prevector<8u, int, unsigned int, int>::const_iterator>(prevector<8u, int, unsigned int, int>::const_iterator, prevector<8u, int, unsigned int, int>::const_iterator)
Unexecuted instantiation: prevector<36u, unsigned char, unsigned int, int>::prevector<std::__1::__wrap_iter<unsigned char*>>(std::__1::__wrap_iter<unsigned char*>, std::__1::__wrap_iter<unsigned char*>)
prevector<35u, unsigned char, unsigned int, int>::prevector<std::__1::__wrap_iter<unsigned char const*>>(std::__1::__wrap_iter<unsigned char const*>, std::__1::__wrap_iter<unsigned char const*>)
Line
Count
Source
209
73
    prevector(InputIterator first, InputIterator last) {
210
73
        size_type n = last - first;
211
73
        change_capacity(n);
212
73
        _size += n;
213
73
        fill(item_ptr(0), first, last);
214
73
    }
Unexecuted instantiation: prevector<36u, unsigned char, unsigned int, int>::prevector<prevector<36u, unsigned char, unsigned int, int>::const_iterator>(prevector<36u, unsigned char, unsigned int, int>::const_iterator, prevector<36u, unsigned char, unsigned int, int>::const_iterator)
215
216
37.7k
    prevector(const prevector<N, T, Size, Diff>& other) {
217
37.7k
        size_type n = other.size();
218
37.7k
        change_capacity(n);
219
37.7k
        _size += n;
220
37.7k
        fill(item_ptr(0), other.begin(),  other.end());
221
37.7k
    }
prevector<16u, unsigned char, unsigned int, int>::prevector(prevector<16u, unsigned char, unsigned int, int> const&)
Line
Count
Source
216
21.9k
    prevector(const prevector<N, T, Size, Diff>& other) {
217
21.9k
        size_type n = other.size();
218
21.9k
        change_capacity(n);
219
21.9k
        _size += n;
220
21.9k
        fill(item_ptr(0), other.begin(),  other.end());
221
21.9k
    }
prevector<36u, unsigned char, unsigned int, int>::prevector(prevector<36u, unsigned char, unsigned int, int> const&)
Line
Count
Source
216
15.7k
    prevector(const prevector<N, T, Size, Diff>& other) {
217
15.7k
        size_type n = other.size();
218
15.7k
        change_capacity(n);
219
15.7k
        _size += n;
220
15.7k
        fill(item_ptr(0), other.begin(),  other.end());
221
15.7k
    }
222
223
    prevector(prevector<N, T, Size, Diff>&& other) noexcept
224
14.1k
        : _union(std::move(other._union)), _size(other._size)
225
14.1k
    {
226
14.1k
        other._size = 0;
227
14.1k
    }
Unexecuted instantiation: prevector<16u, unsigned char, unsigned int, int>::prevector(prevector<16u, unsigned char, unsigned int, int>&&)
prevector<36u, unsigned char, unsigned int, int>::prevector(prevector<36u, unsigned char, unsigned int, int>&&)
Line
Count
Source
224
14.1k
        : _union(std::move(other._union)), _size(other._size)
225
14.1k
    {
226
14.1k
        other._size = 0;
227
14.1k
    }
228
229
12.8k
    prevector& operator=(const prevector<N, T, Size, Diff>& other) {
230
12.8k
        if (&other == this) {
231
0
            return *this;
232
0
        }
233
12.8k
        assign(other.begin(), other.end());
234
12.8k
        return *this;
235
12.8k
    }
prevector<16u, unsigned char, unsigned int, int>::operator=(prevector<16u, unsigned char, unsigned int, int> const&)
Line
Count
Source
229
870
    prevector& operator=(const prevector<N, T, Size, Diff>& other) {
230
870
        if (&other == this) {
231
0
            return *this;
232
0
        }
233
870
        assign(other.begin(), other.end());
234
870
        return *this;
235
870
    }
prevector<36u, unsigned char, unsigned int, int>::operator=(prevector<36u, unsigned char, unsigned int, int> const&)
Line
Count
Source
229
12.0k
    prevector& operator=(const prevector<N, T, Size, Diff>& other) {
230
12.0k
        if (&other == this) {
231
0
            return *this;
232
0
        }
233
12.0k
        assign(other.begin(), other.end());
234
12.0k
        return *this;
235
12.0k
    }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::operator=(prevector<8u, int, unsigned int, int> const&)
236
237
1.82k
    prevector& operator=(prevector<N, T, Size, Diff>&& other) noexcept {
238
1.82k
        if (!is_direct()) {
239
0
            free(_union.indirect_contents.indirect);
240
0
        }
241
1.82k
        _union = std::move(other._union);
242
1.82k
        _size = other._size;
243
1.82k
        other._size = 0;
244
1.82k
        return *this;
245
1.82k
    }
prevector<16u, unsigned char, unsigned int, int>::operator=(prevector<16u, unsigned char, unsigned int, int>&&)
Line
Count
Source
237
1.82k
    prevector& operator=(prevector<N, T, Size, Diff>&& other) noexcept {
238
1.82k
        if (!is_direct()) {
239
0
            free(_union.indirect_contents.indirect);
240
0
        }
241
1.82k
        _union = std::move(other._union);
242
1.82k
        _size = other._size;
243
1.82k
        other._size = 0;
244
1.82k
        return *this;
245
1.82k
    }
Unexecuted instantiation: prevector<36u, unsigned char, unsigned int, int>::operator=(prevector<36u, unsigned char, unsigned int, int>&&)
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::operator=(prevector<8u, int, unsigned int, int>&&)
246
247
346k
    size_type size() const {
248
346k
        return is_direct() ? 
_size212k
:
_size - N - 1133k
;
249
346k
    }
prevector<36u, unsigned char, unsigned int, int>::size() const
Line
Count
Source
247
249k
    size_type size() const {
248
249k
        return is_direct() ? 
_size123k
:
_size - N - 1125k
;
249
249k
    }
Unexecuted instantiation: prevector<33u, unsigned char, unsigned int, int>::size() const
prevector<16u, unsigned char, unsigned int, int>::size() const
Line
Count
Source
247
96.8k
    size_type size() const {
248
96.8k
        return is_direct() ? 
_size88.5k
:
_size - N - 18.29k
;
249
96.8k
    }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::size() const
prevector<35u, unsigned char, unsigned int, int>::size() const
Line
Count
Source
247
511
    size_type size() const {
248
511
        return is_direct() ? _size : 
_size - N - 10
;
249
511
    }
Unexecuted instantiation: prevector<4u, Network, unsigned int, int>::size() const
250
251
18.2k
    bool empty() const {
252
18.2k
        return size() == 0;
253
18.2k
    }
prevector<36u, unsigned char, unsigned int, int>::empty() const
Line
Count
Source
251
18.2k
    bool empty() const {
252
18.2k
        return size() == 0;
253
18.2k
    }
Unexecuted instantiation: prevector<16u, unsigned char, unsigned int, int>::empty() const
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::empty() const
Unexecuted instantiation: prevector<4u, Network, unsigned int, int>::empty() const
254
255
45.5k
    iterator begin() { return iterator(item_ptr(0)); }
Unexecuted instantiation: prevector<33u, unsigned char, unsigned int, int>::begin()
prevector<36u, unsigned char, unsigned int, int>::begin()
Line
Count
Source
255
45.4k
    iterator begin() { return iterator(item_ptr(0)); }
Unexecuted instantiation: prevector<16u, unsigned char, unsigned int, int>::begin()
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::begin()
prevector<35u, unsigned char, unsigned int, int>::begin()
Line
Count
Source
255
146
    iterator begin() { return iterator(item_ptr(0)); }
256
63.0k
    const_iterator begin() const { return const_iterator(item_ptr(0)); }
prevector<36u, unsigned char, unsigned int, int>::begin() const
Line
Count
Source
256
27.7k
    const_iterator begin() const { return const_iterator(item_ptr(0)); }
prevector<16u, unsigned char, unsigned int, int>::begin() const
Line
Count
Source
256
35.2k
    const_iterator begin() const { return const_iterator(item_ptr(0)); }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::begin() const
257
56.5k
    iterator end() { return iterator(item_ptr(size())); }
prevector<36u, unsigned char, unsigned int, int>::end()
Line
Count
Source
257
46.1k
    iterator end() { return iterator(item_ptr(size())); }
Unexecuted instantiation: prevector<33u, unsigned char, unsigned int, int>::end()
prevector<16u, unsigned char, unsigned int, int>::end()
Line
Count
Source
257
10.2k
    iterator end() { return iterator(item_ptr(size())); }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::end()
prevector<35u, unsigned char, unsigned int, int>::end()
Line
Count
Source
257
146
    iterator end() { return iterator(item_ptr(size())); }
258
53.0k
    const_iterator end() const { return const_iterator(item_ptr(size())); }
prevector<36u, unsigned char, unsigned int, int>::end() const
Line
Count
Source
258
27.7k
    const_iterator end() const { return const_iterator(item_ptr(size())); }
prevector<16u, unsigned char, unsigned int, int>::end() const
Line
Count
Source
258
25.2k
    const_iterator end() const { return const_iterator(item_ptr(size())); }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::end() const
259
260
63.3k
    size_t capacity() const {
261
63.3k
        if (is_direct()) {
262
25.6k
            return N;
263
37.6k
        } else {
264
37.6k
            return _union.indirect_contents.capacity;
265
37.6k
        }
266
63.3k
    }
prevector<36u, unsigned char, unsigned int, int>::capacity() const
Line
Count
Source
260
59.6k
    size_t capacity() const {
261
59.6k
        if (is_direct()) {
262
21.9k
            return N;
263
37.6k
        } else {
264
37.6k
            return _union.indirect_contents.capacity;
265
37.6k
        }
266
59.6k
    }
prevector<16u, unsigned char, unsigned int, int>::capacity() const
Line
Count
Source
260
3.58k
    size_t capacity() const {
261
3.58k
        if (is_direct()) {
262
3.58k
            return N;
263
3.58k
        } else {
264
0
            return _union.indirect_contents.capacity;
265
0
        }
266
3.58k
    }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::capacity() const
Unexecuted instantiation: prevector<33u, unsigned char, unsigned int, int>::capacity() const
prevector<35u, unsigned char, unsigned int, int>::capacity() const
Line
Count
Source
260
146
    size_t capacity() const {
261
146
        if (is_direct()) {
262
146
            return N;
263
146
        } else {
264
0
            return _union.indirect_contents.capacity;
265
0
        }
266
146
    }
Unexecuted instantiation: prevector<4u, Network, unsigned int, int>::capacity() const
267
268
0
    T& operator[](size_type pos) {
269
0
        return *item_ptr(pos);
270
0
    }
Unexecuted instantiation: prevector<36u, unsigned char, unsigned int, int>::operator[](unsigned int)
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::operator[](unsigned int)
Unexecuted instantiation: prevector<33u, unsigned char, unsigned int, int>::operator[](unsigned int)
Unexecuted instantiation: prevector<16u, unsigned char, unsigned int, int>::operator[](unsigned int)
Unexecuted instantiation: prevector<4u, Network, unsigned int, int>::operator[](unsigned int)
271
272
6.67k
    const T& operator[](size_type pos) const {
273
6.67k
        return *item_ptr(pos);
274
6.67k
    }
prevector<16u, unsigned char, unsigned int, int>::operator[](unsigned int) const
Line
Count
Source
272
6.67k
    const T& operator[](size_type pos) const {
273
6.67k
        return *item_ptr(pos);
274
6.67k
    }
Unexecuted instantiation: prevector<36u, unsigned char, unsigned int, int>::operator[](unsigned int) const
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::operator[](unsigned int) const
275
276
19.6k
    void resize(size_type new_size) {
277
19.6k
        size_type cur_size = size();
278
19.6k
        if (cur_size == new_size) {
279
13.0k
            return;
280
13.0k
        }
281
6.55k
        if (cur_size > new_size) {
282
5.50k
            erase(item_ptr(new_size), end());
283
5.50k
            return;
284
5.50k
        }
285
1.04k
        if (new_size > capacity()) {
286
1.04k
            change_capacity(new_size);
287
1.04k
        }
288
1.04k
        ptrdiff_t increase = new_size - cur_size;
289
1.04k
        fill(item_ptr(cur_size), increase);
290
1.04k
        _size += increase;
291
1.04k
    }
prevector<36u, unsigned char, unsigned int, int>::resize(unsigned int)
Line
Count
Source
276
12.6k
    void resize(size_type new_size) {
277
12.6k
        size_type cur_size = size();
278
12.6k
        if (cur_size == new_size) {
279
12.2k
            return;
280
12.2k
        }
281
382
        if (cur_size > new_size) {
282
382
            erase(item_ptr(new_size), end());
283
382
            return;
284
382
        }
285
0
        if (new_size > capacity()) {
286
0
            change_capacity(new_size);
287
0
        }
288
0
        ptrdiff_t increase = new_size - cur_size;
289
0
        fill(item_ptr(cur_size), increase);
290
0
        _size += increase;
291
0
    }
prevector<16u, unsigned char, unsigned int, int>::resize(unsigned int)
Line
Count
Source
276
7.00k
    void resize(size_type new_size) {
277
7.00k
        size_type cur_size = size();
278
7.00k
        if (cur_size == new_size) {
279
830
            return;
280
830
        }
281
6.17k
        if (cur_size > new_size) {
282
5.12k
            erase(item_ptr(new_size), end());
283
5.12k
            return;
284
5.12k
        }
285
1.04k
        if (new_size > capacity()) {
286
1.04k
            change_capacity(new_size);
287
1.04k
        }
288
1.04k
        ptrdiff_t increase = new_size - cur_size;
289
1.04k
        fill(item_ptr(cur_size), increase);
290
1.04k
        _size += increase;
291
1.04k
    }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::resize(unsigned int)
Unexecuted instantiation: prevector<33u, unsigned char, unsigned int, int>::resize(unsigned int)
292
293
0
    void reserve(size_type new_capacity) {
294
0
        if (new_capacity > capacity()) {
295
0
            change_capacity(new_capacity);
296
0
        }
297
0
    }
Unexecuted instantiation: prevector<36u, unsigned char, unsigned int, int>::reserve(unsigned int)
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::reserve(unsigned int)
298
299
595
    void shrink_to_fit() {
300
595
        change_capacity(size());
301
595
    }
prevector<36u, unsigned char, unsigned int, int>::shrink_to_fit()
Line
Count
Source
299
595
    void shrink_to_fit() {
300
595
        change_capacity(size());
301
595
    }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::shrink_to_fit()
302
303
15.1k
    void clear() {
304
15.1k
        resize(0);
305
15.1k
    }
prevector<36u, unsigned char, unsigned int, int>::clear()
Line
Count
Source
303
12.6k
    void clear() {
304
12.6k
        resize(0);
305
12.6k
    }
prevector<16u, unsigned char, unsigned int, int>::clear()
Line
Count
Source
303
2.54k
    void clear() {
304
2.54k
        resize(0);
305
2.54k
    }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::clear()
Unexecuted instantiation: prevector<33u, unsigned char, unsigned int, int>::clear()
306
307
23.9k
    iterator insert(iterator pos, const T& value) {
308
23.9k
        size_type p = pos - begin();
309
23.9k
        size_type new_size = size() + 1;
310
23.9k
        if (capacity() < new_size) {
311
705
            change_capacity(new_size + (new_size >> 1));
312
705
        }
313
23.9k
        T* ptr = item_ptr(p);
314
23.9k
        T* dst = ptr + 1;
315
23.9k
        memmove(dst, ptr, (size() - p) * sizeof(T));
316
23.9k
        _size++;
317
23.9k
        new(static_cast<void*>(ptr)) T(value);
318
23.9k
        return iterator(ptr);
319
23.9k
    }
prevector<36u, unsigned char, unsigned int, int>::insert(prevector<36u, unsigned char, unsigned int, int>::iterator, unsigned char const&)
Line
Count
Source
307
23.9k
    iterator insert(iterator pos, const T& value) {
308
23.9k
        size_type p = pos - begin();
309
23.9k
        size_type new_size = size() + 1;
310
23.9k
        if (capacity() < new_size) {
311
705
            change_capacity(new_size + (new_size >> 1));
312
705
        }
313
23.9k
        T* ptr = item_ptr(p);
314
23.9k
        T* dst = ptr + 1;
315
23.9k
        memmove(dst, ptr, (size() - p) * sizeof(T));
316
23.9k
        _size++;
317
23.9k
        new(static_cast<void*>(ptr)) T(value);
318
23.9k
        return iterator(ptr);
319
23.9k
    }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::insert(prevector<8u, int, unsigned int, int>::iterator, int const&)
320
321
0
    void insert(iterator pos, size_type count, const T& value) {
322
0
        size_type p = pos - begin();
323
0
        size_type new_size = size() + count;
324
0
        if (capacity() < new_size) {
325
0
            change_capacity(new_size + (new_size >> 1));
326
0
        }
327
0
        T* ptr = item_ptr(p);
328
0
        T* dst = ptr + count;
329
0
        memmove(dst, ptr, (size() - p) * sizeof(T));
330
0
        _size += count;
331
0
        fill(item_ptr(p), count, value);
332
0
    }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::insert(prevector<8u, int, unsigned int, int>::iterator, unsigned int, int const&)
Unexecuted instantiation: prevector<36u, unsigned char, unsigned int, int>::insert(prevector<36u, unsigned char, unsigned int, int>::iterator, unsigned int, unsigned char const&)
333
334
    template <std::input_iterator InputIterator>
335
21.6k
    void insert(iterator pos, InputIterator first, InputIterator last) {
336
21.6k
        size_type p = pos - begin();
337
21.6k
        difference_type count = last - first;
338
21.6k
        size_type new_size = size() + count;
339
21.6k
        if (capacity() < new_size) {
340
5.01k
            change_capacity(new_size + (new_size >> 1));
341
5.01k
        }
342
21.6k
        T* ptr = item_ptr(p);
343
21.6k
        T* dst = ptr + count;
344
21.6k
        memmove(dst, ptr, (size() - p) * sizeof(T));
345
21.6k
        _size += count;
346
21.6k
        fill(ptr, first, last);
347
21.6k
    }
Unexecuted instantiation: void prevector<36u, unsigned char, unsigned int, int>::insert<unsigned char const*>(prevector<36u, unsigned char, unsigned int, int>::iterator, unsigned char const*, unsigned char const*)
void prevector<36u, unsigned char, unsigned int, int>::insert<std::__1::__wrap_iter<unsigned char const*>>(prevector<36u, unsigned char, unsigned int, int>::iterator, std::__1::__wrap_iter<unsigned char const*>, std::__1::__wrap_iter<unsigned char const*>)
Line
Count
Source
335
16.3k
    void insert(iterator pos, InputIterator first, InputIterator last) {
336
16.3k
        size_type p = pos - begin();
337
16.3k
        difference_type count = last - first;
338
16.3k
        size_type new_size = size() + count;
339
16.3k
        if (capacity() < new_size) {
340
3.85k
            change_capacity(new_size + (new_size >> 1));
341
3.85k
        }
342
16.3k
        T* ptr = item_ptr(p);
343
16.3k
        T* dst = ptr + count;
344
16.3k
        memmove(dst, ptr, (size() - p) * sizeof(T));
345
16.3k
        _size += count;
346
16.3k
        fill(ptr, first, last);
347
16.3k
    }
Unexecuted instantiation: void prevector<36u, unsigned char, unsigned int, int>::insert<prevector<36u, unsigned char, unsigned int, int>::iterator>(prevector<36u, unsigned char, unsigned int, int>::iterator, prevector<36u, unsigned char, unsigned int, int>::iterator, prevector<36u, unsigned char, unsigned int, int>::iterator)
Unexecuted instantiation: void prevector<8u, int, unsigned int, int>::insert<int*>(prevector<8u, int, unsigned int, int>::iterator, int*, int*)
void prevector<36u, unsigned char, unsigned int, int>::insert<std::__1::__wrap_iter<unsigned char*>>(prevector<36u, unsigned char, unsigned int, int>::iterator, std::__1::__wrap_iter<unsigned char*>, std::__1::__wrap_iter<unsigned char*>)
Line
Count
Source
335
5.10k
    void insert(iterator pos, InputIterator first, InputIterator last) {
336
5.10k
        size_type p = pos - begin();
337
5.10k
        difference_type count = last - first;
338
5.10k
        size_type new_size = size() + count;
339
5.10k
        if (capacity() < new_size) {
340
1.15k
            change_capacity(new_size + (new_size >> 1));
341
1.15k
        }
342
5.10k
        T* ptr = item_ptr(p);
343
5.10k
        T* dst = ptr + count;
344
5.10k
        memmove(dst, ptr, (size() - p) * sizeof(T));
345
5.10k
        _size += count;
346
5.10k
        fill(ptr, first, last);
347
5.10k
    }
void prevector<35u, unsigned char, unsigned int, int>::insert<unsigned char*>(prevector<35u, unsigned char, unsigned int, int>::iterator, unsigned char*, unsigned char*)
Line
Count
Source
335
73
    void insert(iterator pos, InputIterator first, InputIterator last) {
336
73
        size_type p = pos - begin();
337
73
        difference_type count = last - first;
338
73
        size_type new_size = size() + count;
339
73
        if (capacity() < new_size) {
340
0
            change_capacity(new_size + (new_size >> 1));
341
0
        }
342
73
        T* ptr = item_ptr(p);
343
73
        T* dst = ptr + count;
344
73
        memmove(dst, ptr, (size() - p) * sizeof(T));
345
73
        _size += count;
346
73
        fill(ptr, first, last);
347
73
    }
void prevector<35u, unsigned char, unsigned int, int>::insert<unsigned char const*>(prevector<35u, unsigned char, unsigned int, int>::iterator, unsigned char const*, unsigned char const*)
Line
Count
Source
335
73
    void insert(iterator pos, InputIterator first, InputIterator last) {
336
73
        size_type p = pos - begin();
337
73
        difference_type count = last - first;
338
73
        size_type new_size = size() + count;
339
73
        if (capacity() < new_size) {
340
0
            change_capacity(new_size + (new_size >> 1));
341
0
        }
342
73
        T* ptr = item_ptr(p);
343
73
        T* dst = ptr + count;
344
73
        memmove(dst, ptr, (size() - p) * sizeof(T));
345
73
        _size += count;
346
73
        fill(ptr, first, last);
347
73
    }
Unexecuted instantiation: void prevector<36u, unsigned char, unsigned int, int>::insert<prevector<36u, unsigned char, unsigned int, int>::const_iterator>(prevector<36u, unsigned char, unsigned int, int>::iterator, prevector<36u, unsigned char, unsigned int, int>::const_iterator, prevector<36u, unsigned char, unsigned int, int>::const_iterator)
348
349
0
    inline void resize_uninitialized(size_type new_size) {
350
        // resize_uninitialized changes the size of the prevector but does not initialize it.
351
        // If size < new_size, the added elements must be initialized explicitly.
352
0
        if (capacity() < new_size) {
353
0
            change_capacity(new_size);
354
0
            _size += new_size - size();
355
0
            return;
356
0
        }
357
0
        if (new_size < size()) {
358
0
            erase(item_ptr(new_size), end());
359
0
        } else {
360
0
            _size += new_size - size();
361
0
        }
362
0
    }
Unexecuted instantiation: prevector<36u, unsigned char, unsigned int, int>::resize_uninitialized(unsigned int)
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::resize_uninitialized(unsigned int)
363
364
0
    iterator erase(iterator pos) {
365
0
        return erase(pos, pos + 1);
366
0
    }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::erase(prevector<8u, int, unsigned int, int>::iterator)
Unexecuted instantiation: prevector<33u, unsigned char, unsigned int, int>::erase(prevector<33u, unsigned char, unsigned int, int>::iterator)
367
368
5.50k
    iterator erase(iterator first, iterator last) {
369
        // Erase is not allowed to the change the object's capacity. That means
370
        // that when starting with an indirectly allocated prevector with
371
        // size and capacity > N, the result may be a still indirectly allocated
372
        // prevector with size <= N and capacity > N. A shrink_to_fit() call is
373
        // necessary to switch to the (more efficient) directly allocated
374
        // representation (with capacity N and size <= N).
375
5.50k
        iterator p = first;
376
5.50k
        char* endp = (char*)&(*end());
377
5.50k
        _size -= last - p;
378
5.50k
        memmove(&(*first), &(*last), endp - ((char*)(&(*last))));
379
5.50k
        return first;
380
5.50k
    }
prevector<36u, unsigned char, unsigned int, int>::erase(prevector<36u, unsigned char, unsigned int, int>::iterator, prevector<36u, unsigned char, unsigned int, int>::iterator)
Line
Count
Source
368
382
    iterator erase(iterator first, iterator last) {
369
        // Erase is not allowed to the change the object's capacity. That means
370
        // that when starting with an indirectly allocated prevector with
371
        // size and capacity > N, the result may be a still indirectly allocated
372
        // prevector with size <= N and capacity > N. A shrink_to_fit() call is
373
        // necessary to switch to the (more efficient) directly allocated
374
        // representation (with capacity N and size <= N).
375
382
        iterator p = first;
376
382
        char* endp = (char*)&(*end());
377
382
        _size -= last - p;
378
382
        memmove(&(*first), &(*last), endp - ((char*)(&(*last))));
379
382
        return first;
380
382
    }
prevector<16u, unsigned char, unsigned int, int>::erase(prevector<16u, unsigned char, unsigned int, int>::iterator, prevector<16u, unsigned char, unsigned int, int>::iterator)
Line
Count
Source
368
5.12k
    iterator erase(iterator first, iterator last) {
369
        // Erase is not allowed to the change the object's capacity. That means
370
        // that when starting with an indirectly allocated prevector with
371
        // size and capacity > N, the result may be a still indirectly allocated
372
        // prevector with size <= N and capacity > N. A shrink_to_fit() call is
373
        // necessary to switch to the (more efficient) directly allocated
374
        // representation (with capacity N and size <= N).
375
5.12k
        iterator p = first;
376
5.12k
        char* endp = (char*)&(*end());
377
5.12k
        _size -= last - p;
378
5.12k
        memmove(&(*first), &(*last), endp - ((char*)(&(*last))));
379
5.12k
        return first;
380
5.12k
    }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::erase(prevector<8u, int, unsigned int, int>::iterator, prevector<8u, int, unsigned int, int>::iterator)
Unexecuted instantiation: prevector<33u, unsigned char, unsigned int, int>::erase(prevector<33u, unsigned char, unsigned int, int>::iterator, prevector<33u, unsigned char, unsigned int, int>::iterator)
381
382
    template<typename... Args>
383
2.16k
    void emplace_back(Args&&... args) {
384
2.16k
        size_type new_size = size() + 1;
385
2.16k
        if (capacity() < new_size) {
386
88
            change_capacity(new_size + (new_size >> 1));
387
88
        }
388
2.16k
        new(item_ptr(size())) T(std::forward<Args>(args)...);
389
2.16k
        _size++;
390
2.16k
    }
void prevector<36u, unsigned char, unsigned int, int>::emplace_back<unsigned char const&>(unsigned char const&)
Line
Count
Source
383
2.16k
    void emplace_back(Args&&... args) {
384
2.16k
        size_type new_size = size() + 1;
385
2.16k
        if (capacity() < new_size) {
386
88
            change_capacity(new_size + (new_size >> 1));
387
88
        }
388
2.16k
        new(item_ptr(size())) T(std::forward<Args>(args)...);
389
2.16k
        _size++;
390
2.16k
    }
Unexecuted instantiation: void prevector<8u, int, unsigned int, int>::emplace_back<int const&>(int const&)
Unexecuted instantiation: void prevector<4u, Network, unsigned int, int>::emplace_back<Network const&>(Network const&)
391
392
2.16k
    void push_back(const T& value) {
393
2.16k
        emplace_back(value);
394
2.16k
    }
prevector<36u, unsigned char, unsigned int, int>::push_back(unsigned char const&)
Line
Count
Source
392
2.16k
    void push_back(const T& value) {
393
2.16k
        emplace_back(value);
394
2.16k
    }
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::push_back(int const&)
Unexecuted instantiation: prevector<4u, Network, unsigned int, int>::push_back(Network const&)
395
396
0
    void pop_back() {
397
0
        erase(end() - 1, end());
398
0
    }
399
400
    T& front() {
401
        return *item_ptr(0);
402
    }
403
404
    const T& front() const {
405
        return *item_ptr(0);
406
    }
407
408
0
    T& back() {
409
0
        return *item_ptr(size() - 1);
410
0
    }
411
412
0
    const T& back() const {
413
0
        return *item_ptr(size() - 1);
414
0
    }
415
416
    void swap(prevector<N, T, Size, Diff>& other) noexcept
417
0
    {
418
0
        std::swap(_union, other._union);
419
0
        std::swap(_size, other._size);
420
0
    }
421
422
90.7k
    ~prevector() {
423
90.7k
        if (!is_direct()) {
424
8.55k
            free(_union.indirect_contents.indirect);
425
8.55k
            _union.indirect_contents.indirect = nullptr;
426
8.55k
        }
427
90.7k
    }
prevector<16u, unsigned char, unsigned int, int>::~prevector()
Line
Count
Source
422
40.4k
    ~prevector() {
423
40.4k
        if (!is_direct()) {
424
4.24k
            free(_union.indirect_contents.indirect);
425
4.24k
            _union.indirect_contents.indirect = nullptr;
426
4.24k
        }
427
40.4k
    }
prevector<36u, unsigned char, unsigned int, int>::~prevector()
Line
Count
Source
422
50.2k
    ~prevector() {
423
50.2k
        if (!is_direct()) {
424
4.31k
            free(_union.indirect_contents.indirect);
425
4.31k
            _union.indirect_contents.indirect = nullptr;
426
4.31k
        }
427
50.2k
    }
Unexecuted instantiation: prevector<33u, unsigned char, unsigned int, int>::~prevector()
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::~prevector()
prevector<35u, unsigned char, unsigned int, int>::~prevector()
Line
Count
Source
422
73
    ~prevector() {
423
73
        if (!is_direct()) {
424
0
            free(_union.indirect_contents.indirect);
425
0
            _union.indirect_contents.indirect = nullptr;
426
0
        }
427
73
    }
Unexecuted instantiation: prevector<4u, Network, unsigned int, int>::~prevector()
428
429
1.21k
    constexpr bool operator==(const prevector& other) const {
430
1.21k
        return std::ranges::equal(*this, other);
431
1.21k
    }
Unexecuted instantiation: prevector<36u, unsigned char, unsigned int, int>::operator==(prevector<36u, unsigned char, unsigned int, int> const&) const
Unexecuted instantiation: prevector<8u, int, unsigned int, int>::operator==(prevector<8u, int, unsigned int, int> const&) const
prevector<16u, unsigned char, unsigned int, int>::operator==(prevector<16u, unsigned char, unsigned int, int> const&) const
Line
Count
Source
429
1.21k
    constexpr bool operator==(const prevector& other) const {
430
1.21k
        return std::ranges::equal(*this, other);
431
1.21k
    }
432
433
0
    bool operator<(const prevector<N, T, Size, Diff>& other) const {
434
0
        if (size() < other.size()) {
435
0
            return true;
436
0
        }
437
0
        if (size() > other.size()) {
438
0
            return false;
439
0
        }
440
0
        const_iterator b1 = begin();
441
0
        const_iterator b2 = other.begin();
442
0
        const_iterator e1 = end();
443
0
        while (b1 != e1) {
444
0
            if ((*b1) < (*b2)) {
445
0
                return true;
446
0
            }
447
0
            if ((*b2) < (*b1)) {
448
0
                return false;
449
0
            }
450
0
            ++b1;
451
0
            ++b2;
452
0
        }
453
0
        return false;
454
0
    }
Unexecuted instantiation: prevector<36u, unsigned char, unsigned int, int>::operator<(prevector<36u, unsigned char, unsigned int, int> const&) const
Unexecuted instantiation: prevector<16u, unsigned char, unsigned int, int>::operator<(prevector<16u, unsigned char, unsigned int, int> const&) const
455
456
0
    size_t allocated_memory() const {
457
0
        if (is_direct()) {
458
0
            return 0;
459
0
        } else {
460
0
            return ((size_t)(sizeof(T))) * _union.indirect_contents.capacity;
461
0
        }
462
0
    }
463
464
5.12k
    value_type* data() {
465
5.12k
        return item_ptr(0);
466
5.12k
    }
Unexecuted instantiation: prevector<33u, unsigned char, unsigned int, int>::data()
prevector<36u, unsigned char, unsigned int, int>::data()
Line
Count
Source
464
595
    value_type* data() {
465
595
        return item_ptr(0);
466
595
    }
prevector<16u, unsigned char, unsigned int, int>::data()
Line
Count
Source
464
4.45k
    value_type* data() {
465
4.45k
        return item_ptr(0);
466
4.45k
    }
prevector<35u, unsigned char, unsigned int, int>::data()
Line
Count
Source
464
73
    value_type* data() {
465
73
        return item_ptr(0);
466
73
    }
467
468
20.4k
    const value_type* data() const {
469
20.4k
        return item_ptr(0);
470
20.4k
    }
prevector<36u, unsigned char, unsigned int, int>::data() const
Line
Count
Source
468
9.02k
    const value_type* data() const {
469
9.02k
        return item_ptr(0);
470
9.02k
    }
prevector<16u, unsigned char, unsigned int, int>::data() const
Line
Count
Source
468
11.4k
    const value_type* data() const {
469
11.4k
        return item_ptr(0);
470
11.4k
    }
Unexecuted instantiation: prevector<33u, unsigned char, unsigned int, int>::data() const
471
};
472
473
#endif // BITCOIN_PREVECTOR_H