Coverage Report

Created: 2026-04-29 19:21

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/tmp/bitcoin/src/script/script.h
Line
Count
Source
1
// Copyright (c) 2009-2010 Satoshi Nakamoto
2
// Copyright (c) 2009-present The Bitcoin Core developers
3
// Distributed under the MIT software license, see the accompanying
4
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
6
#ifndef BITCOIN_SCRIPT_SCRIPT_H
7
#define BITCOIN_SCRIPT_SCRIPT_H
8
9
#include <attributes.h>
10
#include <crypto/common.h>
11
#include <prevector.h> // IWYU pragma: export
12
#include <serialize.h>
13
#include <uint256.h>
14
#include <util/hash_type.h>
15
16
#include <cassert>
17
#include <cstdint>
18
#include <cstring>
19
#include <limits>
20
#include <span>
21
#include <stdexcept>
22
#include <string>
23
#include <type_traits>
24
#include <utility>
25
#include <vector>
26
27
// Maximum number of bytes pushable to the stack
28
static const unsigned int MAX_SCRIPT_ELEMENT_SIZE = 520;
29
30
// Maximum number of non-push operations per script
31
static const int MAX_OPS_PER_SCRIPT = 201;
32
33
// Maximum number of public keys per multisig
34
static const int MAX_PUBKEYS_PER_MULTISIG = 20;
35
36
/** The limit of keys in OP_CHECKSIGADD-based scripts. It is due to the stack limit in BIP342. */
37
static constexpr unsigned int MAX_PUBKEYS_PER_MULTI_A = 999;
38
39
// Maximum script length in bytes
40
static const int MAX_SCRIPT_SIZE = 10000;
41
42
// Maximum number of values on script interpreter stack
43
static const int MAX_STACK_SIZE = 1000;
44
45
// Threshold for nLockTime: below this value it is interpreted as block number,
46
// otherwise as UNIX timestamp.
47
static const unsigned int LOCKTIME_THRESHOLD = 500000000; // Tue Nov  5 00:53:20 1985 UTC
48
49
// Maximum nLockTime. Since a lock time indicates the last invalid timestamp, a
50
// transaction with this lock time will never be valid unless lock time
51
// checking is disabled (by setting all input sequence numbers to
52
// SEQUENCE_FINAL).
53
static const uint32_t LOCKTIME_MAX = 0xFFFFFFFFU;
54
55
// Tag for input annex. If there are at least two witness elements for a transaction input,
56
// and the first byte of the last element is 0x50, this last element is called annex, and
57
// has meanings independent of the script
58
static constexpr unsigned int ANNEX_TAG = 0x50;
59
60
// Validation weight per passing signature (Tapscript only, see BIP 342).
61
static constexpr int64_t VALIDATION_WEIGHT_PER_SIGOP_PASSED{50};
62
63
// How much weight budget is added to the witness size (Tapscript only, see BIP 342).
64
static constexpr int64_t VALIDATION_WEIGHT_OFFSET{50};
65
66
template <typename T>
67
std::vector<unsigned char> ToByteVector(const T& in)
68
2.07M
{
69
2.07M
    return std::vector<unsigned char>(in.begin(), in.end());
70
2.07M
}
std::vector<unsigned char, std::allocator<unsigned char>> ToByteVector<CPubKey>(CPubKey const&)
Line
Count
Source
68
130k
{
69
130k
    return std::vector<unsigned char>(in.begin(), in.end());
70
130k
}
std::vector<unsigned char, std::allocator<unsigned char>> ToByteVector<CKeyID>(CKeyID const&)
Line
Count
Source
68
14
{
69
14
    return std::vector<unsigned char>(in.begin(), in.end());
70
14
}
std::vector<unsigned char, std::allocator<unsigned char>> ToByteVector<CScriptID>(CScriptID const&)
Line
Count
Source
68
41
{
69
41
    return std::vector<unsigned char>(in.begin(), in.end());
70
41
}
std::vector<unsigned char, std::allocator<unsigned char>> ToByteVector<uint160>(uint160 const&)
Line
Count
Source
68
42
{
69
42
    return std::vector<unsigned char>(in.begin(), in.end());
70
42
}
std::vector<unsigned char, std::allocator<unsigned char>> ToByteVector<uint256>(uint256 const&)
Line
Count
Source
68
104
{
69
104
    return std::vector<unsigned char>(in.begin(), in.end());
70
104
}
std::vector<unsigned char, std::allocator<unsigned char>> ToByteVector<WitnessV0ScriptHash>(WitnessV0ScriptHash const&)
Line
Count
Source
68
18.8k
{
69
18.8k
    return std::vector<unsigned char>(in.begin(), in.end());
70
18.8k
}
std::vector<unsigned char, std::allocator<unsigned char>> ToByteVector<XOnlyPubKey>(XOnlyPubKey const&)
Line
Count
Source
68
1.02M
{
69
1.02M
    return std::vector<unsigned char>(in.begin(), in.end());
70
1.02M
}
std::vector<unsigned char, std::allocator<unsigned char>> ToByteVector<CScript>(CScript const&)
Line
Count
Source
68
362
{
69
362
    return std::vector<unsigned char>(in.begin(), in.end());
70
362
}
std::vector<unsigned char, std::allocator<unsigned char>> ToByteVector<WitnessV1Taproot>(WitnessV1Taproot const&)
Line
Count
Source
68
130k
{
69
130k
    return std::vector<unsigned char>(in.begin(), in.end());
70
130k
}
std::vector<unsigned char, std::allocator<unsigned char>> ToByteVector<std::vector<unsigned char, std::allocator<unsigned char>>>(std::vector<unsigned char, std::allocator<unsigned char>> const&)
Line
Count
Source
68
39.5k
{
69
39.5k
    return std::vector<unsigned char>(in.begin(), in.end());
70
39.5k
}
std::vector<unsigned char, std::allocator<unsigned char>> ToByteVector<PKHash>(PKHash const&)
Line
Count
Source
68
183k
{
69
183k
    return std::vector<unsigned char>(in.begin(), in.end());
70
183k
}
std::vector<unsigned char, std::allocator<unsigned char>> ToByteVector<ScriptHash>(ScriptHash const&)
Line
Count
Source
68
139k
{
69
139k
    return std::vector<unsigned char>(in.begin(), in.end());
70
139k
}
std::vector<unsigned char, std::allocator<unsigned char>> ToByteVector<WitnessV0KeyHash>(WitnessV0KeyHash const&)
Line
Count
Source
68
409k
{
69
409k
    return std::vector<unsigned char>(in.begin(), in.end());
70
409k
}
71
72
/** Script opcodes */
73
enum opcodetype
74
{
75
    // push value
76
    OP_0 = 0x00,
77
    OP_FALSE = OP_0,
78
    OP_PUSHDATA1 = 0x4c,
79
    OP_PUSHDATA2 = 0x4d,
80
    OP_PUSHDATA4 = 0x4e,
81
    OP_1NEGATE = 0x4f,
82
    OP_RESERVED = 0x50,
83
    OP_1 = 0x51,
84
    OP_TRUE=OP_1,
85
    OP_2 = 0x52,
86
    OP_3 = 0x53,
87
    OP_4 = 0x54,
88
    OP_5 = 0x55,
89
    OP_6 = 0x56,
90
    OP_7 = 0x57,
91
    OP_8 = 0x58,
92
    OP_9 = 0x59,
93
    OP_10 = 0x5a,
94
    OP_11 = 0x5b,
95
    OP_12 = 0x5c,
96
    OP_13 = 0x5d,
97
    OP_14 = 0x5e,
98
    OP_15 = 0x5f,
99
    OP_16 = 0x60,
100
101
    // control
102
    OP_NOP = 0x61,
103
    OP_VER = 0x62,
104
    OP_IF = 0x63,
105
    OP_NOTIF = 0x64,
106
    OP_VERIF = 0x65,
107
    OP_VERNOTIF = 0x66,
108
    OP_ELSE = 0x67,
109
    OP_ENDIF = 0x68,
110
    OP_VERIFY = 0x69,
111
    OP_RETURN = 0x6a,
112
113
    // stack ops
114
    OP_TOALTSTACK = 0x6b,
115
    OP_FROMALTSTACK = 0x6c,
116
    OP_2DROP = 0x6d,
117
    OP_2DUP = 0x6e,
118
    OP_3DUP = 0x6f,
119
    OP_2OVER = 0x70,
120
    OP_2ROT = 0x71,
121
    OP_2SWAP = 0x72,
122
    OP_IFDUP = 0x73,
123
    OP_DEPTH = 0x74,
124
    OP_DROP = 0x75,
125
    OP_DUP = 0x76,
126
    OP_NIP = 0x77,
127
    OP_OVER = 0x78,
128
    OP_PICK = 0x79,
129
    OP_ROLL = 0x7a,
130
    OP_ROT = 0x7b,
131
    OP_SWAP = 0x7c,
132
    OP_TUCK = 0x7d,
133
134
    // splice ops
135
    OP_CAT = 0x7e,
136
    OP_SUBSTR = 0x7f,
137
    OP_LEFT = 0x80,
138
    OP_RIGHT = 0x81,
139
    OP_SIZE = 0x82,
140
141
    // bit logic
142
    OP_INVERT = 0x83,
143
    OP_AND = 0x84,
144
    OP_OR = 0x85,
145
    OP_XOR = 0x86,
146
    OP_EQUAL = 0x87,
147
    OP_EQUALVERIFY = 0x88,
148
    OP_RESERVED1 = 0x89,
149
    OP_RESERVED2 = 0x8a,
150
151
    // numeric
152
    OP_1ADD = 0x8b,
153
    OP_1SUB = 0x8c,
154
    OP_2MUL = 0x8d,
155
    OP_2DIV = 0x8e,
156
    OP_NEGATE = 0x8f,
157
    OP_ABS = 0x90,
158
    OP_NOT = 0x91,
159
    OP_0NOTEQUAL = 0x92,
160
161
    OP_ADD = 0x93,
162
    OP_SUB = 0x94,
163
    OP_MUL = 0x95,
164
    OP_DIV = 0x96,
165
    OP_MOD = 0x97,
166
    OP_LSHIFT = 0x98,
167
    OP_RSHIFT = 0x99,
168
169
    OP_BOOLAND = 0x9a,
170
    OP_BOOLOR = 0x9b,
171
    OP_NUMEQUAL = 0x9c,
172
    OP_NUMEQUALVERIFY = 0x9d,
173
    OP_NUMNOTEQUAL = 0x9e,
174
    OP_LESSTHAN = 0x9f,
175
    OP_GREATERTHAN = 0xa0,
176
    OP_LESSTHANOREQUAL = 0xa1,
177
    OP_GREATERTHANOREQUAL = 0xa2,
178
    OP_MIN = 0xa3,
179
    OP_MAX = 0xa4,
180
181
    OP_WITHIN = 0xa5,
182
183
    // crypto
184
    OP_RIPEMD160 = 0xa6,
185
    OP_SHA1 = 0xa7,
186
    OP_SHA256 = 0xa8,
187
    OP_HASH160 = 0xa9,
188
    OP_HASH256 = 0xaa,
189
    OP_CODESEPARATOR = 0xab,
190
    OP_CHECKSIG = 0xac,
191
    OP_CHECKSIGVERIFY = 0xad,
192
    OP_CHECKMULTISIG = 0xae,
193
    OP_CHECKMULTISIGVERIFY = 0xaf,
194
195
    // expansion
196
    OP_NOP1 = 0xb0,
197
    OP_CHECKLOCKTIMEVERIFY = 0xb1,
198
    OP_NOP2 = OP_CHECKLOCKTIMEVERIFY,
199
    OP_CHECKSEQUENCEVERIFY = 0xb2,
200
    OP_NOP3 = OP_CHECKSEQUENCEVERIFY,
201
    OP_NOP4 = 0xb3,
202
    OP_NOP5 = 0xb4,
203
    OP_NOP6 = 0xb5,
204
    OP_NOP7 = 0xb6,
205
    OP_NOP8 = 0xb7,
206
    OP_NOP9 = 0xb8,
207
    OP_NOP10 = 0xb9,
208
209
    // Opcode added by BIP 342 (Tapscript)
210
    OP_CHECKSIGADD = 0xba,
211
212
    OP_INVALIDOPCODE = 0xff,
213
};
214
215
// Maximum value that an opcode can be
216
static const unsigned int MAX_OPCODE = OP_NOP10;
217
218
std::string GetOpName(opcodetype opcode);
219
220
class scriptnum_error : public std::runtime_error
221
{
222
public:
223
9.33k
    explicit scriptnum_error(const std::string& str) : std::runtime_error(str) {}
224
};
225
226
class CScriptNum
227
{
228
/**
229
 * Numeric opcodes (OP_1ADD, etc) are restricted to operating on 4-byte integers.
230
 * The semantics are subtle, though: operands must be in the range [-2^31 +1...2^31 -1],
231
 * but results may overflow (and are valid as long as they are not used in a subsequent
232
 * numeric operation). CScriptNum enforces those semantics by storing results as
233
 * an int64 and allowing out-of-range values to be returned as a vector of bytes but
234
 * throwing an exception if arithmetic is done or the result is interpreted as an integer.
235
 */
236
public:
237
238
    explicit CScriptNum(const int64_t& n)
239
1.09M
    {
240
1.09M
        m_value = n;
241
1.09M
    }
242
243
    static const size_t nDefaultMaxNumSize = 4;
244
245
    explicit CScriptNum(const std::vector<unsigned char>& vch, bool fRequireMinimal,
246
                        const size_t nMaxNumSize = nDefaultMaxNumSize)
247
6.94M
    {
248
6.94M
        if (vch.size() > nMaxNumSize) {
249
1.87k
            throw scriptnum_error("script number overflow");
250
1.87k
        }
251
6.94M
        if (fRequireMinimal && vch.size() > 0) {
252
            // Check that the number is encoded with the minimum possible
253
            // number of bytes.
254
            //
255
            // If the most-significant-byte - excluding the sign bit - is zero
256
            // then we're not minimal. Note how this test also rejects the
257
            // negative-zero encoding, 0x80.
258
6.00M
            if ((vch.back() & 0x7f) == 0) {
259
                // One exception: if there's more than one byte and the most
260
                // significant bit of the second-most-significant-byte is set
261
                // it would conflict with the sign bit. An example of this case
262
                // is +-255, which encode to 0xff00 and 0xff80 respectively.
263
                // (big-endian).
264
7.96k
                if (vch.size() <= 1 || (vch[vch.size() - 2] & 0x80) == 0) {
265
7.46k
                    throw scriptnum_error("non-minimally encoded script number");
266
7.46k
                }
267
7.96k
            }
268
6.00M
        }
269
6.94M
        m_value = set_vch(vch);
270
6.94M
    }
271
272
6.33M
    inline bool operator==(const int64_t& rhs) const    { return m_value == rhs; }
273
86.4k
    inline auto operator<=>(const int64_t& rhs) const    { return m_value <=> rhs; }
274
275
6.31M
    inline bool operator==(const CScriptNum& rhs) const { return operator==(rhs.m_value); }
276
29.9k
    inline auto operator<=>(const CScriptNum& rhs) const { return operator<=>(rhs.m_value); }
277
278
207k
    inline CScriptNum operator+(   const int64_t& rhs)    const { return CScriptNum(m_value + rhs);}
279
7.02k
    inline CScriptNum operator-(   const int64_t& rhs)    const { return CScriptNum(m_value - rhs);}
280
10.3k
    inline CScriptNum operator+(   const CScriptNum& rhs) const { return operator+(rhs.m_value);   }
281
4.22k
    inline CScriptNum operator-(   const CScriptNum& rhs) const { return operator-(rhs.m_value);   }
282
283
1.82k
    inline CScriptNum& operator+=( const CScriptNum& rhs)       { return operator+=(rhs.m_value);  }
284
814
    inline CScriptNum& operator-=( const CScriptNum& rhs)       { return operator-=(rhs.m_value);  }
285
286
19.2k
    inline CScriptNum operator&(   const int64_t& rhs)    const { return CScriptNum(m_value & rhs);}
287
0
    inline CScriptNum operator&(   const CScriptNum& rhs) const { return operator&(rhs.m_value);   }
288
289
0
    inline CScriptNum& operator&=( const CScriptNum& rhs)       { return operator&=(rhs.m_value);  }
290
291
    inline CScriptNum operator-()                         const
292
2.94k
    {
293
2.94k
        assert(m_value != std::numeric_limits<int64_t>::min());
294
2.94k
        return CScriptNum(-m_value);
295
2.94k
    }
296
297
    inline CScriptNum& operator=( const int64_t& rhs)
298
6.31M
    {
299
6.31M
        m_value = rhs;
300
6.31M
        return *this;
301
6.31M
    }
302
303
    inline CScriptNum& operator+=( const int64_t& rhs)
304
1.82k
    {
305
1.82k
        assert(rhs == 0 || (rhs > 0 && m_value <= std::numeric_limits<int64_t>::max() - rhs) ||
306
1.82k
                           (rhs < 0 && m_value >= std::numeric_limits<int64_t>::min() - rhs));
307
1.82k
        m_value += rhs;
308
1.82k
        return *this;
309
1.82k
    }
310
311
    inline CScriptNum& operator-=( const int64_t& rhs)
312
814
    {
313
814
        assert(rhs == 0 || (rhs > 0 && m_value >= std::numeric_limits<int64_t>::min() + rhs) ||
314
814
                           (rhs < 0 && m_value <= std::numeric_limits<int64_t>::max() + rhs));
315
814
        m_value -= rhs;
316
814
        return *this;
317
814
    }
318
319
    inline CScriptNum& operator&=( const int64_t& rhs)
320
0
    {
321
0
        m_value &= rhs;
322
0
        return *this;
323
0
    }
324
325
    int getint() const
326
351k
    {
327
351k
        if (m_value > std::numeric_limits<int>::max())
328
1.22k
            return std::numeric_limits<int>::max();
329
350k
        else if (m_value < std::numeric_limits<int>::min())
330
874
            return std::numeric_limits<int>::min();
331
349k
        return m_value;
332
351k
    }
333
334
11.2k
    int64_t GetInt64() const { return m_value; }
335
336
    std::vector<unsigned char> getvch() const
337
7.33M
    {
338
7.33M
        return serialize(m_value);
339
7.33M
    }
340
341
    static std::vector<unsigned char> serialize(const int64_t& value)
342
7.60M
    {
343
7.60M
        if(value == 0)
344
105k
            return std::vector<unsigned char>();
345
346
7.49M
        std::vector<unsigned char> result;
347
7.49M
        const bool neg = value < 0;
348
7.49M
        uint64_t absvalue = neg ? ~static_cast<uint64_t>(value) + 1 : static_cast<uint64_t>(value);
349
350
15.2M
        while(absvalue)
351
7.74M
        {
352
7.74M
            result.push_back(absvalue & 0xff);
353
7.74M
            absvalue >>= 8;
354
7.74M
        }
355
356
//    - If the most significant byte is >= 0x80 and the value is positive, push a
357
//    new zero-byte to make the significant byte < 0x80 again.
358
359
//    - If the most significant byte is >= 0x80 and the value is negative, push a
360
//    new 0x80 byte that will be popped off when converting to an integral.
361
362
//    - If the most significant byte is < 0x80 and the value is negative, add
363
//    0x80 to it, since it will be subtracted and interpreted as a negative when
364
//    converting to an integral.
365
366
7.49M
        if (result.back() & 0x80)
367
66.6k
            result.push_back(neg ? 0x80 : 0);
368
7.43M
        else if (neg)
369
12.2k
            result.back() |= 0x80;
370
371
7.49M
        return result;
372
7.60M
    }
373
374
private:
375
    static int64_t set_vch(const std::vector<unsigned char>& vch)
376
6.94M
    {
377
6.94M
      if (vch.empty())
378
387k
          return 0;
379
380
6.55M
      int64_t result = 0;
381
13.1M
      for (size_t i = 0; i != vch.size(); ++i)
382
6.60M
          result |= static_cast<int64_t>(vch[i]) << 8*i;
383
384
      // If the input vector's most significant byte is 0x80, remove it from
385
      // the result's msb and return a negative.
386
6.55M
      if (vch.back() & 0x80)
387
19.0k
          return -((int64_t)(result & ~(0x80ULL << (8 * (vch.size() - 1)))));
388
389
6.53M
      return result;
390
6.55M
    }
391
392
    int64_t m_value;
393
};
394
395
/**
396
 * We use a prevector for the script to reduce the considerable memory overhead
397
 *  of vectors in cases where they normally contain a small number of small elements.
398
 */
399
using CScriptBase = prevector<36, uint8_t>;
400
401
bool GetScriptOp(CScriptBase::const_iterator& pc, CScriptBase::const_iterator end, opcodetype& opcodeRet, std::vector<unsigned char>* pvchRet);
402
403
/** Serialized script, used inside transaction inputs and outputs */
404
class CScript : public CScriptBase
405
{
406
private:
407
    inline void AppendDataSize(const uint32_t size)
408
2.68M
    {
409
2.68M
        if (size < OP_PUSHDATA1) {
410
2.68M
            insert(end(), static_cast<value_type>(size));
411
2.68M
        } else if (size <= 0xff) {
412
2.45k
            insert(end(), OP_PUSHDATA1);
413
2.45k
            insert(end(), static_cast<value_type>(size));
414
2.45k
        } else if (size <= 0xffff) {
415
377
            insert(end(), OP_PUSHDATA2);
416
377
            value_type data[2];
417
377
            WriteLE16(data, size);
418
377
            insert(end(), std::cbegin(data), std::cend(data));
419
377
        } else {
420
3
            insert(end(), OP_PUSHDATA4);
421
3
            value_type data[4];
422
3
            WriteLE32(data, size);
423
3
            insert(end(), std::cbegin(data), std::cend(data));
424
3
        }
425
2.68M
    }
426
427
    void AppendData(std::span<const value_type> data)
428
2.68M
    {
429
2.68M
        insert(end(), data.begin(), data.end());
430
2.68M
    }
431
432
protected:
433
    CScript& push_int64(int64_t n)
434
343k
    {
435
343k
        if (n == -1 || (n >= 1 && n <= 16))
436
69.0k
        {
437
69.0k
            push_back(n + (OP_1 - 1));
438
69.0k
        }
439
274k
        else if (n == 0)
440
2.87k
        {
441
2.87k
            push_back(OP_0);
442
2.87k
        }
443
271k
        else
444
271k
        {
445
271k
            *this << CScriptNum::serialize(n);
446
271k
        }
447
343k
        return *this;
448
343k
    }
449
450
public:
451
84.8M
    CScript() = default;
452
    template <std::input_iterator InputIterator>
453
609k
    CScript(InputIterator first, InputIterator last) : CScriptBase{first, last} { }
CScript::CScript<__gnu_cxx::__normal_iterator<unsigned char*, std::vector<unsigned char, std::allocator<unsigned char>>>>(__gnu_cxx::__normal_iterator<unsigned char*, std::vector<unsigned char, std::allocator<unsigned char>>>, __gnu_cxx::__normal_iterator<unsigned char*, std::vector<unsigned char, std::allocator<unsigned char>>>)
Line
Count
Source
453
37.1k
    CScript(InputIterator first, InputIterator last) : CScriptBase{first, last} { }
CScript::CScript<unsigned char const*>(unsigned char const*, unsigned char const*)
Line
Count
Source
453
13
    CScript(InputIterator first, InputIterator last) : CScriptBase{first, last} { }
CScript::CScript<__gnu_cxx::__normal_iterator<unsigned char const*, std::span<unsigned char const, 18446744073709551615ul>::__iter_tag>>(__gnu_cxx::__normal_iterator<unsigned char const*, std::span<unsigned char const, 18446744073709551615ul>::__iter_tag>, __gnu_cxx::__normal_iterator<unsigned char const*, std::span<unsigned char const, 18446744073709551615ul>::__iter_tag>)
Line
Count
Source
453
6.79k
    CScript(InputIterator first, InputIterator last) : CScriptBase{first, last} { }
CScript::CScript<__gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char>>>>(__gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char>>>, __gnu_cxx::__normal_iterator<unsigned char const*, std::vector<unsigned char, std::allocator<unsigned char>>>)
Line
Count
Source
453
195k
    CScript(InputIterator first, InputIterator last) : CScriptBase{first, last} { }
CScript::CScript<__gnu_cxx::__normal_iterator<unsigned char const*, std::span<unsigned char const, 4ul>::__iter_tag>>(__gnu_cxx::__normal_iterator<unsigned char const*, std::span<unsigned char const, 4ul>::__iter_tag>, __gnu_cxx::__normal_iterator<unsigned char const*, std::span<unsigned char const, 4ul>::__iter_tag>)
Line
Count
Source
453
7
    CScript(InputIterator first, InputIterator last) : CScriptBase{first, last} { }
CScript::CScript<__gnu_cxx::__normal_iterator<unsigned char const*, std::span<unsigned char const, 8ul>::__iter_tag>>(__gnu_cxx::__normal_iterator<unsigned char const*, std::span<unsigned char const, 8ul>::__iter_tag>, __gnu_cxx::__normal_iterator<unsigned char const*, std::span<unsigned char const, 8ul>::__iter_tag>)
Line
Count
Source
453
4
    CScript(InputIterator first, InputIterator last) : CScriptBase{first, last} { }
CScript::CScript<__gnu_cxx::__normal_iterator<unsigned char const*, std::span<unsigned char const, 1ul>::__iter_tag>>(__gnu_cxx::__normal_iterator<unsigned char const*, std::span<unsigned char const, 1ul>::__iter_tag>, __gnu_cxx::__normal_iterator<unsigned char const*, std::span<unsigned char const, 1ul>::__iter_tag>)
Line
Count
Source
453
6
    CScript(InputIterator first, InputIterator last) : CScriptBase{first, last} { }
CScript::CScript<__gnu_cxx::__normal_iterator<unsigned char const*, std::span<unsigned char const, 5ul>::__iter_tag>>(__gnu_cxx::__normal_iterator<unsigned char const*, std::span<unsigned char const, 5ul>::__iter_tag>, __gnu_cxx::__normal_iterator<unsigned char const*, std::span<unsigned char const, 5ul>::__iter_tag>)
Line
Count
Source
453
2
    CScript(InputIterator first, InputIterator last) : CScriptBase{first, last} { }
CScript::CScript<__gnu_cxx::__normal_iterator<unsigned char const*, std::span<unsigned char const, 3ul>::__iter_tag>>(__gnu_cxx::__normal_iterator<unsigned char const*, std::span<unsigned char const, 3ul>::__iter_tag>, __gnu_cxx::__normal_iterator<unsigned char const*, std::span<unsigned char const, 3ul>::__iter_tag>)
Line
Count
Source
453
7
    CScript(InputIterator first, InputIterator last) : CScriptBase{first, last} { }
CScript::CScript<__gnu_cxx::__normal_iterator<unsigned char const*, std::span<unsigned char const, 7ul>::__iter_tag>>(__gnu_cxx::__normal_iterator<unsigned char const*, std::span<unsigned char const, 7ul>::__iter_tag>, __gnu_cxx::__normal_iterator<unsigned char const*, std::span<unsigned char const, 7ul>::__iter_tag>)
Line
Count
Source
453
2
    CScript(InputIterator first, InputIterator last) : CScriptBase{first, last} { }
CScript::CScript<__gnu_cxx::__normal_iterator<unsigned char const*, std::span<unsigned char const, 25ul>::__iter_tag>>(__gnu_cxx::__normal_iterator<unsigned char const*, std::span<unsigned char const, 25ul>::__iter_tag>, __gnu_cxx::__normal_iterator<unsigned char const*, std::span<unsigned char const, 25ul>::__iter_tag>)
Line
Count
Source
453
2
    CScript(InputIterator first, InputIterator last) : CScriptBase{first, last} { }
CScript::CScript<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
453
369k
    CScript(InputIterator first, InputIterator last) : CScriptBase{first, last} { }
454
455
30.8M
    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
void CScript::SerializationOps<ParamsStream<SizeComputer&, TransactionSerParams>, CScript const, ActionSerialize>(CScript const&, ParamsStream<SizeComputer&, TransactionSerParams>&, ActionSerialize)
Line
Count
Source
455
7.51M
    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
void CScript::SerializationOps<ParamsStream<DataStream&, TransactionSerParams>, CScript, ActionUnserialize>(CScript&, ParamsStream<DataStream&, TransactionSerParams>&, ActionUnserialize)
Line
Count
Source
455
388k
    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
void CScript::SerializationOps<ParamsStream<DataStream&, TransactionSerParams>, CScript const, ActionSerialize>(CScript const&, ParamsStream<DataStream&, TransactionSerParams>&, ActionSerialize)
Line
Count
Source
455
200k
    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
void CScript::SerializationOps<DataStream, CScript, ActionUnserialize>(CScript&, DataStream&, ActionUnserialize)
Line
Count
Source
455
9.76k
    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
void CScript::SerializationOps<SpanReader, CScript, ActionUnserialize>(CScript&, SpanReader&, ActionUnserialize)
Line
Count
Source
455
4.57k
    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
void CScript::SerializationOps<ParamsStream<HashWriter&, TransactionSerParams>, CScript const, ActionSerialize>(CScript const&, ParamsStream<HashWriter&, TransactionSerParams>&, ActionSerialize)
Line
Count
Source
455
5.36M
    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
void CScript::SerializationOps<ParamsStream<SpanReader&, TransactionSerParams>, CScript, ActionUnserialize>(CScript&, ParamsStream<SpanReader&, TransactionSerParams>&, ActionUnserialize)
Line
Count
Source
455
789k
    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
void CScript::SerializationOps<SizeComputer, CScript const, ActionSerialize>(CScript const&, SizeComputer&, ActionSerialize)
Line
Count
Source
455
393k
    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
void CScript::SerializationOps<DataStream, CScript const, ActionSerialize>(CScript const&, DataStream&, ActionSerialize)
Line
Count
Source
455
7.15k
    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
void CScript::SerializationOps<ParamsStream<AutoFile&, TransactionSerParams>, CScript, ActionUnserialize>(CScript&, ParamsStream<AutoFile&, TransactionSerParams>&, ActionUnserialize)
Line
Count
Source
455
1.21k
    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
void CScript::SerializationOps<HashWriter, CScript const, ActionSerialize>(CScript const&, HashWriter&, ActionSerialize)
Line
Count
Source
455
15.3M
    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
void CScript::SerializationOps<ParamsStream<VectorWriter&, TransactionSerParams>, CScript const, ActionSerialize>(CScript const&, ParamsStream<VectorWriter&, TransactionSerParams>&, ActionSerialize)
Line
Count
Source
455
247k
    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
void CScript::SerializationOps<ParamsStream<BufferedWriter<AutoFile>&, TransactionSerParams>, CScript const, ActionSerialize>(CScript const&, ParamsStream<BufferedWriter<AutoFile>&, TransactionSerParams>&, ActionSerialize)
Line
Count
Source
455
559k
    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
void CScript::SerializationOps<ParamsStream<AutoFile&, TransactionSerParams>, CScript const, ActionSerialize>(CScript const&, ParamsStream<AutoFile&, TransactionSerParams>&, ActionSerialize)
Line
Count
Source
455
4.35k
    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
void CScript::SerializationOps<ParamsStream<BufferedFile&, TransactionSerParams>, CScript, ActionUnserialize>(CScript&, ParamsStream<BufferedFile&, TransactionSerParams>&, ActionUnserialize)
Line
Count
Source
455
5.45k
    SERIALIZE_METHODS(CScript, obj) { READWRITE(AsBase<CScriptBase>(obj)); }
456
457
0
    explicit CScript(int64_t b) { operator<<(b); }
458
50.0k
    explicit CScript(opcodetype b)     { operator<<(b); }
459
0
    explicit CScript(const CScriptNum& b) { operator<<(b); }
460
    // delete non-existent constructor to defend against future introduction
461
    // e.g. via prevector
462
    explicit CScript(const std::vector<unsigned char>& b) = delete;
463
464
    /** Delete non-existent operator to defend against future introduction */
465
    CScript& operator<<(const CScript& b) = delete;
466
467
343k
    CScript& operator<<(int64_t b) LIFETIMEBOUND { return push_int64(b); }
468
469
    CScript& operator<<(opcodetype opcode) LIFETIMEBOUND
470
6.27M
    {
471
6.27M
        if (opcode < 0 || opcode > 0xff)
472
0
            throw std::runtime_error("CScript::operator<<(): invalid opcode");
473
6.27M
        insert(end(), (unsigned char)opcode);
474
6.27M
        return *this;
475
6.27M
    }
476
477
    CScript& operator<<(const CScriptNum& b) LIFETIMEBOUND
478
14.6k
    {
479
14.6k
        *this << b.getvch();
480
14.6k
        return *this;
481
14.6k
    }
482
483
    CScript& operator<<(std::span<const std::byte> b) LIFETIMEBOUND
484
2.68M
    {
485
2.68M
        AppendDataSize(b.size());
486
2.68M
        AppendData({reinterpret_cast<const value_type*>(b.data()), b.size()});
487
2.68M
        return *this;
488
2.68M
    }
489
490
    // For compatibility reasons. In new code, prefer using std::byte instead of uint8_t.
491
    CScript& operator<<(std::span<const value_type> b) LIFETIMEBOUND
492
2.67M
    {
493
2.67M
        return *this << std::as_bytes(b);
494
2.67M
    }
495
496
    bool GetOp(const_iterator& pc, opcodetype& opcodeRet, std::vector<unsigned char>& vchRet) const
497
66.6M
    {
498
66.6M
        return GetScriptOp(pc, end(), opcodeRet, &vchRet);
499
66.6M
    }
500
501
    bool GetOp(const_iterator& pc, opcodetype& opcodeRet) const
502
617M
    {
503
617M
        return GetScriptOp(pc, end(), opcodeRet, nullptr);
504
617M
    }
505
506
    /** Encode/decode small integers: */
507
    static int DecodeOP_N(opcodetype opcode)
508
1.39M
    {
509
1.39M
        if (opcode == OP_0)
510
822k
            return 0;
511
1.39M
        assert(opcode >= OP_1 && opcode <= OP_16);
512
568k
        return (int)opcode - (int)(OP_1 - 1);
513
568k
    }
514
    static opcodetype EncodeOP_N(int n)
515
122
    {
516
122
        assert(n >= 0 && n <= 16);
517
122
        if (n == 0)
518
0
            return OP_0;
519
122
        return (opcodetype)(OP_1+n-1);
520
122
    }
521
522
    /**
523
     * Pre-version-0.6, Bitcoin always counted CHECKMULTISIGs
524
     * as 20 sigops. With pay-to-script-hash, that changed:
525
     * CHECKMULTISIGs serialized in scriptSigs are
526
     * counted more accurately, assuming they are of the form
527
     *  ... OP_N CHECKMULTISIG ...
528
     */
529
    unsigned int GetSigOpCount(bool fAccurate) const;
530
531
    /**
532
     * Accurately count sigOps, including sigOps in
533
     * pay-to-script-hash transactions:
534
     */
535
    unsigned int GetSigOpCount(const CScript& scriptSig) const;
536
537
    /*
538
     * OP_1 <0x4e73>
539
     */
540
    bool IsPayToAnchor() const;
541
    /** Checks if output of IsWitnessProgram comes from a P2A output script
542
     */
543
    static bool IsPayToAnchor(int version, const std::vector<unsigned char>& program);
544
545
    bool IsPayToScriptHash() const;
546
    bool IsPayToWitnessScriptHash() const;
547
    bool IsWitnessProgram(int& version, std::vector<unsigned char>& program) const;
548
549
    bool IsPayToTaproot() const;
550
551
    /** Called by IsStandardTx and P2SH/BIP62 VerifyScript (which makes it consensus-critical). */
552
    bool IsPushOnly(const_iterator pc) const;
553
    bool IsPushOnly() const;
554
555
    /** Check if the script contains valid OP_CODES */
556
    bool HasValidOps() const;
557
558
    /**
559
     * Returns whether the script is guaranteed to fail at execution,
560
     * regardless of the initial stack. This allows outputs to be pruned
561
     * instantly when entering the UTXO set.
562
     */
563
    bool IsUnspendable() const
564
22.2M
    {
565
22.2M
        return (size() > 0 && *begin() == OP_RETURN) || (size() > MAX_SCRIPT_SIZE);
566
22.2M
    }
567
568
    void clear()
569
90.0M
    {
570
        // The default prevector::clear() does not release memory
571
90.0M
        CScriptBase::clear();
572
90.0M
        shrink_to_fit();
573
90.0M
    }
574
};
575
576
struct CScriptWitness
577
{
578
    // Note that this encodes the data elements being pushed, rather than
579
    // encoding them as a CScript that pushes them.
580
    std::vector<std::vector<unsigned char> > stack;
581
582
    // Some compilers complain without a default constructor
583
1.38M
    CScriptWitness() = default;
584
585
1.61M
    bool IsNull() const { return stack.empty(); }
586
587
9.09k
    void SetNull() { stack.clear(); stack.shrink_to_fit(); }
588
589
    std::string ToString() const;
590
};
591
592
/** A reference to a CScript: the Hash160 of its serialization */
593
class CScriptID : public BaseHash<uint160>
594
{
595
public:
596
394k
    CScriptID() : BaseHash() {}
597
    explicit CScriptID(const CScript& in);
598
73.3k
    explicit CScriptID(const uint160& in) : BaseHash(in) {}
599
};
600
601
/** Test for OP_SUCCESSx opcodes as defined by BIP342. */
602
bool IsOpSuccess(const opcodetype& opcode);
603
604
bool CheckMinimalPush(const std::vector<unsigned char>& data, opcodetype opcode);
605
606
/** Build a script by concatenating other scripts, or any argument accepted by CScript::operator<<. */
607
template<typename... Ts>
608
CScript BuildScript(Ts&&... inputs)
609
1.70M
{
610
1.70M
    CScript ret;
611
1.70M
    int cnt{0};
612
613
3.41M
    ([&ret, &cnt] (Ts&& input) {
614
3.41M
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
1.68M
            if (cnt == 0) {
617
1.66M
                ret = std::forward<Ts>(input);
618
1.66M
            } else {
619
22.7k
                ret.insert(ret.end(), input.begin(), input.end());
620
22.7k
            }
621
1.72M
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
1.72M
            ret << input;
624
1.72M
        }
625
3.41M
        cnt++;
626
3.41M
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<std::vector<unsigned char, std::allocator<unsigned char>>>(std::vector<unsigned char, std::allocator<unsigned char>>&&)::'lambda'(std::vector<unsigned char, std::allocator<unsigned char>>&&)::operator()(std::vector<unsigned char, std::allocator<unsigned char>>&&) const
Line
Count
Source
613
3.63k
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
3.63k
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
3.63k
            ret << input;
624
3.63k
        }
625
3.63k
        cnt++;
626
3.63k
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, opcodetype, std::vector<unsigned char, std::allocator<unsigned char>>, opcodetype>(opcodetype&&, opcodetype&&, std::vector<unsigned char, std::allocator<unsigned char>>&&, opcodetype&&)::'lambda1'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
590
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
590
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
590
            ret << input;
624
590
        }
625
590
        cnt++;
626
590
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, opcodetype, std::vector<unsigned char, std::allocator<unsigned char>>, opcodetype>(opcodetype&&, opcodetype&&, std::vector<unsigned char, std::allocator<unsigned char>>&&, opcodetype&&)::'lambda0'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
590
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
590
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
590
            ret << input;
624
590
        }
625
590
        cnt++;
626
590
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, opcodetype, std::vector<unsigned char, std::allocator<unsigned char>>, opcodetype>(opcodetype&&, opcodetype&&, std::vector<unsigned char, std::allocator<unsigned char>>&&, opcodetype&&)::'lambda'(std::vector<unsigned char, std::allocator<unsigned char>>&&)::operator()(std::vector<unsigned char, std::allocator<unsigned char>>&&) const
Line
Count
Source
613
590
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
590
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
590
            ret << input;
624
590
        }
625
590
        cnt++;
626
590
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, opcodetype, std::vector<unsigned char, std::allocator<unsigned char>>, opcodetype>(opcodetype&&, opcodetype&&, std::vector<unsigned char, std::allocator<unsigned char>>&&, opcodetype&&)::'lambda'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
590
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
590
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
590
            ret << input;
624
590
        }
625
590
        cnt++;
626
590
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<unsigned int const&, opcodetype>(unsigned int const&, opcodetype&&)::'lambda'(unsigned int const&)::operator()(unsigned int const&) const
Line
Count
Source
613
7.66k
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
7.66k
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
7.66k
            ret << input;
624
7.66k
        }
625
7.66k
        cnt++;
626
7.66k
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<unsigned int const&, opcodetype>(unsigned int const&, opcodetype&&)::'lambda'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
7.66k
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
7.66k
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
7.66k
            ret << input;
624
7.66k
        }
625
7.66k
        cnt++;
626
7.66k
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, int, opcodetype, opcodetype, std::vector<unsigned char, std::allocator<unsigned char>> const&, opcodetype>(opcodetype&&, int&&, opcodetype&&, opcodetype&&, std::vector<unsigned char, std::allocator<unsigned char>> const&, opcodetype&&)::'lambda2'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
525
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
525
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
525
            ret << input;
624
525
        }
625
525
        cnt++;
626
525
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, int, opcodetype, opcodetype, std::vector<unsigned char, std::allocator<unsigned char>> const&, opcodetype>(opcodetype&&, int&&, opcodetype&&, opcodetype&&, std::vector<unsigned char, std::allocator<unsigned char>> const&, opcodetype&&)::'lambda'(int&&)::operator()(int&&) const
Line
Count
Source
613
525
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
525
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
525
            ret << input;
624
525
        }
625
525
        cnt++;
626
525
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, int, opcodetype, opcodetype, std::vector<unsigned char, std::allocator<unsigned char>> const&, opcodetype>(opcodetype&&, int&&, opcodetype&&, opcodetype&&, std::vector<unsigned char, std::allocator<unsigned char>> const&, opcodetype&&)::'lambda1'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
525
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
525
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
525
            ret << input;
624
525
        }
625
525
        cnt++;
626
525
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, int, opcodetype, opcodetype, std::vector<unsigned char, std::allocator<unsigned char>> const&, opcodetype>(opcodetype&&, int&&, opcodetype&&, opcodetype&&, std::vector<unsigned char, std::allocator<unsigned char>> const&, opcodetype&&)::'lambda0'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
525
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
525
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
525
            ret << input;
624
525
        }
625
525
        cnt++;
626
525
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, int, opcodetype, opcodetype, std::vector<unsigned char, std::allocator<unsigned char>> const&, opcodetype>(opcodetype&&, int&&, opcodetype&&, opcodetype&&, std::vector<unsigned char, std::allocator<unsigned char>> const&, opcodetype&&)::'lambda'(std::vector<unsigned char, std::allocator<unsigned char>> const&)::operator()(std::vector<unsigned char, std::allocator<unsigned char>> const&) const
Line
Count
Source
613
525
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
525
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
525
            ret << input;
624
525
        }
625
525
        cnt++;
626
525
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, int, opcodetype, opcodetype, std::vector<unsigned char, std::allocator<unsigned char>> const&, opcodetype>(opcodetype&&, int&&, opcodetype&&, opcodetype&&, std::vector<unsigned char, std::allocator<unsigned char>> const&, opcodetype&&)::'lambda'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
525
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
525
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
525
            ret << input;
624
525
        }
625
525
        cnt++;
626
525
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, CScript&, opcodetype>(opcodetype&&, CScript&, opcodetype&&)::'lambda0'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
7.82k
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
7.82k
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
7.82k
            ret << input;
624
7.82k
        }
625
7.82k
        cnt++;
626
7.82k
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, CScript&, opcodetype>(opcodetype&&, CScript&, opcodetype&&)::'lambda'(CScript&)::operator()(CScript&) const
Line
Count
Source
613
7.82k
    ([&ret, &cnt] (Ts&& input) {
614
7.82k
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
7.82k
            if (cnt == 0) {
617
0
                ret = std::forward<Ts>(input);
618
7.82k
            } else {
619
7.82k
                ret.insert(ret.end(), input.begin(), input.end());
620
7.82k
            }
621
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
            ret << input;
624
        }
625
7.82k
        cnt++;
626
7.82k
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, CScript&, opcodetype>(opcodetype&&, CScript&, opcodetype&&)::'lambda'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
7.82k
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
7.82k
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
7.82k
            ret << input;
624
7.82k
        }
625
7.82k
        cnt++;
626
7.82k
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, CScript&>(opcodetype&&, CScript&)::'lambda'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
1.48k
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
1.48k
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
1.48k
            ret << input;
624
1.48k
        }
625
1.48k
        cnt++;
626
1.48k
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, CScript&>(opcodetype&&, CScript&)::'lambda'(CScript&)::operator()(CScript&) const
Line
Count
Source
613
1.48k
    ([&ret, &cnt] (Ts&& input) {
614
1.48k
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
1.48k
            if (cnt == 0) {
617
0
                ret = std::forward<Ts>(input);
618
1.48k
            } else {
619
1.48k
                ret.insert(ret.end(), input.begin(), input.end());
620
1.48k
            }
621
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
            ret << input;
624
        }
625
1.48k
        cnt++;
626
1.48k
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, opcodetype>(CScript&&, opcodetype&&)::'lambda'(CScript&&)::operator()(CScript&&) const
Line
Count
Source
613
1.65M
    ([&ret, &cnt] (Ts&& input) {
614
1.65M
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
1.65M
            if (cnt == 0) {
617
1.65M
                ret = std::forward<Ts>(input);
618
1.65M
            } else {
619
0
                ret.insert(ret.end(), input.begin(), input.end());
620
0
            }
621
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
            ret << input;
624
        }
625
1.65M
        cnt++;
626
1.65M
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, opcodetype>(CScript&&, opcodetype&&)::'lambda'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
1.65M
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
1.65M
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
1.65M
            ret << input;
624
1.65M
        }
625
1.65M
        cnt++;
626
1.65M
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, opcodetype, CScript&, opcodetype>(opcodetype&&, opcodetype&&, CScript&, opcodetype&&)::'lambda1'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
145
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
145
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
145
            ret << input;
624
145
        }
625
145
        cnt++;
626
145
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, opcodetype, CScript&, opcodetype>(opcodetype&&, opcodetype&&, CScript&, opcodetype&&)::'lambda0'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
145
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
145
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
145
            ret << input;
624
145
        }
625
145
        cnt++;
626
145
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, opcodetype, CScript&, opcodetype>(opcodetype&&, opcodetype&&, CScript&, opcodetype&&)::'lambda'(CScript&)::operator()(CScript&) const
Line
Count
Source
613
145
    ([&ret, &cnt] (Ts&& input) {
614
145
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
145
            if (cnt == 0) {
617
0
                ret = std::forward<Ts>(input);
618
145
            } else {
619
145
                ret.insert(ret.end(), input.begin(), input.end());
620
145
            }
621
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
            ret << input;
624
        }
625
145
        cnt++;
626
145
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, opcodetype, CScript&, opcodetype>(opcodetype&&, opcodetype&&, CScript&, opcodetype&&)::'lambda'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
145
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
145
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
145
            ret << input;
624
145
        }
625
145
        cnt++;
626
145
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, opcodetype, opcodetype, CScript&, opcodetype>(opcodetype&&, opcodetype&&, opcodetype&&, CScript&, opcodetype&&)::'lambda2'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
24
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
24
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
24
            ret << input;
624
24
        }
625
24
        cnt++;
626
24
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, opcodetype, opcodetype, CScript&, opcodetype>(opcodetype&&, opcodetype&&, opcodetype&&, CScript&, opcodetype&&)::'lambda1'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
24
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
24
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
24
            ret << input;
624
24
        }
625
24
        cnt++;
626
24
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, opcodetype, opcodetype, CScript&, opcodetype>(opcodetype&&, opcodetype&&, opcodetype&&, CScript&, opcodetype&&)::'lambda0'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
24
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
24
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
24
            ret << input;
624
24
        }
625
24
        cnt++;
626
24
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, opcodetype, opcodetype, CScript&, opcodetype>(opcodetype&&, opcodetype&&, opcodetype&&, CScript&, opcodetype&&)::'lambda'(CScript&)::operator()(CScript&) const
Line
Count
Source
613
24
    ([&ret, &cnt] (Ts&& input) {
614
24
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
24
            if (cnt == 0) {
617
0
                ret = std::forward<Ts>(input);
618
24
            } else {
619
24
                ret.insert(ret.end(), input.begin(), input.end());
620
24
            }
621
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
            ret << input;
624
        }
625
24
        cnt++;
626
24
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, opcodetype, opcodetype, CScript&, opcodetype>(opcodetype&&, opcodetype&&, opcodetype&&, CScript&, opcodetype&&)::'lambda'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
24
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
24
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
24
            ret << input;
624
24
        }
625
24
        cnt++;
626
24
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype>(opcodetype&&)::'lambda'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
1.37k
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
1.37k
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
1.37k
            ret << input;
624
1.37k
        }
625
1.37k
        cnt++;
626
1.37k
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, CScript&>(CScript&&, CScript&)::'lambda'(CScript&&)::operator()(CScript&&) const
Line
Count
Source
613
1.11k
    ([&ret, &cnt] (Ts&& input) {
614
1.11k
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
1.11k
            if (cnt == 0) {
617
1.11k
                ret = std::forward<Ts>(input);
618
1.11k
            } else {
619
0
                ret.insert(ret.end(), input.begin(), input.end());
620
0
            }
621
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
            ret << input;
624
        }
625
1.11k
        cnt++;
626
1.11k
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, CScript&>(CScript&&, CScript&)::'lambda'(CScript&)::operator()(CScript&) const
Line
Count
Source
613
1.11k
    ([&ret, &cnt] (Ts&& input) {
614
1.11k
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
1.11k
            if (cnt == 0) {
617
0
                ret = std::forward<Ts>(input);
618
1.11k
            } else {
619
1.11k
                ret.insert(ret.end(), input.begin(), input.end());
620
1.11k
            }
621
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
            ret << input;
624
        }
625
1.11k
        cnt++;
626
1.11k
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, CScript&, opcodetype>(CScript&&, CScript&, opcodetype&&)::'lambda'(CScript&&)::operator()(CScript&&) const
Line
Count
Source
613
9.31k
    ([&ret, &cnt] (Ts&& input) {
614
9.31k
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
9.31k
            if (cnt == 0) {
617
9.31k
                ret = std::forward<Ts>(input);
618
9.31k
            } else {
619
0
                ret.insert(ret.end(), input.begin(), input.end());
620
0
            }
621
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
            ret << input;
624
        }
625
9.31k
        cnt++;
626
9.31k
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, CScript&, opcodetype>(CScript&&, CScript&, opcodetype&&)::'lambda'(CScript&)::operator()(CScript&) const
Line
Count
Source
613
9.31k
    ([&ret, &cnt] (Ts&& input) {
614
9.31k
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
9.31k
            if (cnt == 0) {
617
0
                ret = std::forward<Ts>(input);
618
9.31k
            } else {
619
9.31k
                ret.insert(ret.end(), input.begin(), input.end());
620
9.31k
            }
621
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
            ret << input;
624
        }
625
9.31k
        cnt++;
626
9.31k
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, CScript&, opcodetype>(CScript&&, CScript&, opcodetype&&)::'lambda'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
9.31k
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
9.31k
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
9.31k
            ret << input;
624
9.31k
        }
625
9.31k
        cnt++;
626
9.31k
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, opcodetype, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, opcodetype&&, CScript&, opcodetype&&)::'lambda'(CScript&&)::operator()(CScript&&) const
Line
Count
Source
613
150
    ([&ret, &cnt] (Ts&& input) {
614
150
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
150
            if (cnt == 0) {
617
150
                ret = std::forward<Ts>(input);
618
150
            } else {
619
0
                ret.insert(ret.end(), input.begin(), input.end());
620
0
            }
621
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
            ret << input;
624
        }
625
150
        cnt++;
626
150
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, opcodetype, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, opcodetype&&, CScript&, opcodetype&&)::'lambda1'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
150
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
150
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
150
            ret << input;
624
150
        }
625
150
        cnt++;
626
150
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, opcodetype, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, opcodetype&&, CScript&, opcodetype&&)::'lambda0'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
150
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
150
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
150
            ret << input;
624
150
        }
625
150
        cnt++;
626
150
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, opcodetype, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, opcodetype&&, CScript&, opcodetype&&)::'lambda'(CScript&)::operator()(CScript&) const
Line
Count
Source
613
150
    ([&ret, &cnt] (Ts&& input) {
614
150
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
150
            if (cnt == 0) {
617
0
                ret = std::forward<Ts>(input);
618
150
            } else {
619
150
                ret.insert(ret.end(), input.begin(), input.end());
620
150
            }
621
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
            ret << input;
624
        }
625
150
        cnt++;
626
150
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, opcodetype, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, opcodetype&&, CScript&, opcodetype&&)::'lambda'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
150
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
150
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
150
            ret << input;
624
150
        }
625
150
        cnt++;
626
150
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, CScript&, opcodetype&&)::'lambda'(CScript&&)::operator()(CScript&&) const
Line
Count
Source
613
57
    ([&ret, &cnt] (Ts&& input) {
614
57
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
57
            if (cnt == 0) {
617
57
                ret = std::forward<Ts>(input);
618
57
            } else {
619
0
                ret.insert(ret.end(), input.begin(), input.end());
620
0
            }
621
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
            ret << input;
624
        }
625
57
        cnt++;
626
57
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, CScript&, opcodetype&&)::'lambda0'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
57
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
57
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
57
            ret << input;
624
57
        }
625
57
        cnt++;
626
57
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, CScript&, opcodetype&&)::'lambda'(CScript&)::operator()(CScript&) const
Line
Count
Source
613
57
    ([&ret, &cnt] (Ts&& input) {
614
57
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
57
            if (cnt == 0) {
617
0
                ret = std::forward<Ts>(input);
618
57
            } else {
619
57
                ret.insert(ret.end(), input.begin(), input.end());
620
57
            }
621
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
            ret << input;
624
        }
625
57
        cnt++;
626
57
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, CScript&, opcodetype&&)::'lambda'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
57
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
57
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
57
            ret << input;
624
57
        }
625
57
        cnt++;
626
57
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, CScript&, opcodetype, CScript&, opcodetype>(opcodetype&&, CScript&, opcodetype&&, CScript&, opcodetype&&)::'lambda1'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
1.05k
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
1.05k
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
1.05k
            ret << input;
624
1.05k
        }
625
1.05k
        cnt++;
626
1.05k
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, CScript&, opcodetype, CScript&, opcodetype>(opcodetype&&, CScript&, opcodetype&&, CScript&, opcodetype&&)::'lambda0'(CScript&)::operator()(CScript&) const
Line
Count
Source
613
1.05k
    ([&ret, &cnt] (Ts&& input) {
614
1.05k
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
1.05k
            if (cnt == 0) {
617
0
                ret = std::forward<Ts>(input);
618
1.05k
            } else {
619
1.05k
                ret.insert(ret.end(), input.begin(), input.end());
620
1.05k
            }
621
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
            ret << input;
624
        }
625
1.05k
        cnt++;
626
1.05k
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, CScript&, opcodetype, CScript&, opcodetype>(opcodetype&&, CScript&, opcodetype&&, CScript&, opcodetype&&)::'lambda0'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
1.05k
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
1.05k
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
1.05k
            ret << input;
624
1.05k
        }
625
1.05k
        cnt++;
626
1.05k
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, CScript&, opcodetype, CScript&, opcodetype>(opcodetype&&, CScript&, opcodetype&&, CScript&, opcodetype&&)::'lambda'(CScript&)::operator()(CScript&) const
Line
Count
Source
613
1.05k
    ([&ret, &cnt] (Ts&& input) {
614
1.05k
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
1.05k
            if (cnt == 0) {
617
0
                ret = std::forward<Ts>(input);
618
1.05k
            } else {
619
1.05k
                ret.insert(ret.end(), input.begin(), input.end());
620
1.05k
            }
621
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
            ret << input;
624
        }
625
1.05k
        cnt++;
626
1.05k
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<opcodetype, CScript&, opcodetype, CScript&, opcodetype>(opcodetype&&, CScript&, opcodetype&&, CScript&, opcodetype&&)::'lambda'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
1.05k
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
1.05k
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
1.05k
            ret << input;
624
1.05k
        }
625
1.05k
        cnt++;
626
1.05k
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, opcodetype, CScript&, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, CScript&, opcodetype&&, CScript&, opcodetype&&)::'lambda'(CScript&&)::operator()(CScript&&) const
Line
Count
Source
613
262
    ([&ret, &cnt] (Ts&& input) {
614
262
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
262
            if (cnt == 0) {
617
262
                ret = std::forward<Ts>(input);
618
262
            } else {
619
0
                ret.insert(ret.end(), input.begin(), input.end());
620
0
            }
621
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
            ret << input;
624
        }
625
262
        cnt++;
626
262
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, opcodetype, CScript&, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, CScript&, opcodetype&&, CScript&, opcodetype&&)::'lambda1'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
262
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
262
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
262
            ret << input;
624
262
        }
625
262
        cnt++;
626
262
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, opcodetype, CScript&, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, CScript&, opcodetype&&, CScript&, opcodetype&&)::'lambda0'(CScript&)::operator()(CScript&) const
Line
Count
Source
613
262
    ([&ret, &cnt] (Ts&& input) {
614
262
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
262
            if (cnt == 0) {
617
0
                ret = std::forward<Ts>(input);
618
262
            } else {
619
262
                ret.insert(ret.end(), input.begin(), input.end());
620
262
            }
621
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
            ret << input;
624
        }
625
262
        cnt++;
626
262
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, opcodetype, CScript&, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, CScript&, opcodetype&&, CScript&, opcodetype&&)::'lambda0'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
262
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
262
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
262
            ret << input;
624
262
        }
625
262
        cnt++;
626
262
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, opcodetype, CScript&, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, CScript&, opcodetype&&, CScript&, opcodetype&&)::'lambda'(CScript&)::operator()(CScript&) const
Line
Count
Source
613
262
    ([&ret, &cnt] (Ts&& input) {
614
262
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
262
            if (cnt == 0) {
617
0
                ret = std::forward<Ts>(input);
618
262
            } else {
619
262
                ret.insert(ret.end(), input.begin(), input.end());
620
262
            }
621
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
            ret << input;
624
        }
625
262
        cnt++;
626
262
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, opcodetype, CScript&, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, CScript&, opcodetype&&, CScript&, opcodetype&&)::'lambda'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
262
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
262
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
262
            ret << input;
624
262
        }
625
262
        cnt++;
626
262
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<unsigned int const&>(unsigned int const&)::'lambda'(unsigned int const&)::operator()(unsigned int const&) const
Line
Count
Source
613
212
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
212
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
212
            ret << input;
624
212
        }
625
212
        cnt++;
626
212
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, std::vector<unsigned char, std::allocator<unsigned char>>>(CScript&&, std::vector<unsigned char, std::allocator<unsigned char>>&&)::'lambda'(CScript&&)::operator()(CScript&&) const
Line
Count
Source
613
445
    ([&ret, &cnt] (Ts&& input) {
614
445
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
445
            if (cnt == 0) {
617
445
                ret = std::forward<Ts>(input);
618
445
            } else {
619
0
                ret.insert(ret.end(), input.begin(), input.end());
620
0
            }
621
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
            ret << input;
624
        }
625
445
        cnt++;
626
445
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, std::vector<unsigned char, std::allocator<unsigned char>>>(CScript&&, std::vector<unsigned char, std::allocator<unsigned char>>&&)::'lambda'(std::vector<unsigned char, std::allocator<unsigned char>>&&)::operator()(std::vector<unsigned char, std::allocator<unsigned char>>&&) const
Line
Count
Source
613
445
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
445
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
445
            ret << input;
624
445
        }
625
445
        cnt++;
626
445
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, unsigned long, opcodetype>(CScript&&, unsigned long&&, opcodetype&&)::'lambda'(CScript&&)::operator()(CScript&&) const
Line
Count
Source
613
212
    ([&ret, &cnt] (Ts&& input) {
614
212
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
212
            if (cnt == 0) {
617
212
                ret = std::forward<Ts>(input);
618
212
            } else {
619
0
                ret.insert(ret.end(), input.begin(), input.end());
620
0
            }
621
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
            ret << input;
624
        }
625
212
        cnt++;
626
212
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, unsigned long, opcodetype>(CScript&&, unsigned long&&, opcodetype&&)::'lambda'(unsigned long&&)::operator()(unsigned long&&) const
Line
Count
Source
613
212
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
212
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
212
            ret << input;
624
212
        }
625
212
        cnt++;
626
212
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, unsigned long, opcodetype>(CScript&&, unsigned long&&, opcodetype&&)::'lambda'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
212
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
212
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
212
            ret << input;
624
212
        }
625
212
        cnt++;
626
212
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<std::vector<unsigned char, std::allocator<unsigned char>>, opcodetype>(std::vector<unsigned char, std::allocator<unsigned char>>&&, opcodetype&&)::'lambda'(std::vector<unsigned char, std::allocator<unsigned char>>&&)::operator()(std::vector<unsigned char, std::allocator<unsigned char>>&&) const
Line
Count
Source
613
52
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
52
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
52
            ret << input;
624
52
        }
625
52
        cnt++;
626
52
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<std::vector<unsigned char, std::allocator<unsigned char>>, opcodetype>(std::vector<unsigned char, std::allocator<unsigned char>>&&, opcodetype&&)::'lambda'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
52
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
52
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
52
            ret << input;
624
52
        }
625
52
        cnt++;
626
52
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, std::vector<unsigned char, std::allocator<unsigned char>>, opcodetype>(CScript&&, std::vector<unsigned char, std::allocator<unsigned char>>&&, opcodetype&&)::'lambda'(CScript&&)::operator()(CScript&&) const
Line
Count
Source
613
145
    ([&ret, &cnt] (Ts&& input) {
614
145
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
145
            if (cnt == 0) {
617
145
                ret = std::forward<Ts>(input);
618
145
            } else {
619
0
                ret.insert(ret.end(), input.begin(), input.end());
620
0
            }
621
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
            ret << input;
624
        }
625
145
        cnt++;
626
145
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, std::vector<unsigned char, std::allocator<unsigned char>>, opcodetype>(CScript&&, std::vector<unsigned char, std::allocator<unsigned char>>&&, opcodetype&&)::'lambda'(std::vector<unsigned char, std::allocator<unsigned char>>&&)::operator()(std::vector<unsigned char, std::allocator<unsigned char>>&&) const
Line
Count
Source
613
145
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
145
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
145
            ret << input;
624
145
        }
625
145
        cnt++;
626
145
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, std::vector<unsigned char, std::allocator<unsigned char>>, opcodetype>(CScript&&, std::vector<unsigned char, std::allocator<unsigned char>>&&, opcodetype&&)::'lambda'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
145
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
145
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
145
            ret << input;
624
145
        }
625
145
        cnt++;
626
145
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, unsigned int const&, opcodetype>(CScript&&, unsigned int const&, opcodetype&&)::'lambda'(CScript&&)::operator()(CScript&&) const
Line
Count
Source
613
600
    ([&ret, &cnt] (Ts&& input) {
614
600
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
600
            if (cnt == 0) {
617
600
                ret = std::forward<Ts>(input);
618
600
            } else {
619
0
                ret.insert(ret.end(), input.begin(), input.end());
620
0
            }
621
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
            ret << input;
624
        }
625
600
        cnt++;
626
600
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, unsigned int const&, opcodetype>(CScript&&, unsigned int const&, opcodetype&&)::'lambda'(unsigned int const&)::operator()(unsigned int const&) const
Line
Count
Source
613
600
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
600
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
600
            ret << input;
624
600
        }
625
600
        cnt++;
626
600
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<CScript, unsigned int const&, opcodetype>(CScript&&, unsigned int const&, opcodetype&&)::'lambda'(opcodetype&&)::operator()(opcodetype&&) const
Line
Count
Source
613
600
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
600
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
600
            ret << input;
624
600
        }
625
600
        cnt++;
626
600
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<long const&>(long const&)::'lambda'(long const&)::operator()(long const&) const
Line
Count
Source
613
16
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
16
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
16
            ret << input;
624
16
        }
625
16
        cnt++;
626
16
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<unsigned long const&>(unsigned long const&)::'lambda'(unsigned long const&)::operator()(unsigned long const&) const
Line
Count
Source
613
230
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
230
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
230
            ret << input;
624
230
        }
625
230
        cnt++;
626
230
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<int const&>(int const&)::'lambda'(int const&)::operator()(int const&) const
Line
Count
Source
613
230
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
230
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
230
            ret << input;
624
230
        }
625
230
        cnt++;
626
230
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<unsigned int&>(unsigned int&)::'lambda'(unsigned int&)::operator()(unsigned int&) const
Line
Count
Source
613
10.4k
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
10.4k
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
10.4k
            ret << input;
624
10.4k
        }
625
10.4k
        cnt++;
626
10.4k
    } (std::forward<Ts>(inputs)), ...);
CScript BuildScript<unsigned long&>(unsigned long&)::'lambda'(unsigned long&)::operator()(unsigned long&) const
Line
Count
Source
613
177
    ([&ret, &cnt] (Ts&& input) {
614
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
            if (cnt == 0) {
617
                ret = std::forward<Ts>(input);
618
            } else {
619
                ret.insert(ret.end(), input.begin(), input.end());
620
            }
621
177
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
177
            ret << input;
624
177
        }
625
177
        cnt++;
626
177
    } (std::forward<Ts>(inputs)), ...);
627
628
1.70M
    return ret;
629
1.70M
}
CScript BuildScript<std::vector<unsigned char, std::allocator<unsigned char>>>(std::vector<unsigned char, std::allocator<unsigned char>>&&)
Line
Count
Source
609
3.63k
{
610
3.63k
    CScript ret;
611
3.63k
    int cnt{0};
612
613
3.63k
    ([&ret, &cnt] (Ts&& input) {
614
3.63k
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
3.63k
            if (cnt == 0) {
617
3.63k
                ret = std::forward<Ts>(input);
618
3.63k
            } else {
619
3.63k
                ret.insert(ret.end(), input.begin(), input.end());
620
3.63k
            }
621
3.63k
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
3.63k
            ret << input;
624
3.63k
        }
625
3.63k
        cnt++;
626
3.63k
    } (std::forward<Ts>(inputs)), ...);
627
628
3.63k
    return ret;
629
3.63k
}
CScript BuildScript<opcodetype, opcodetype, std::vector<unsigned char, std::allocator<unsigned char>>, opcodetype>(opcodetype&&, opcodetype&&, std::vector<unsigned char, std::allocator<unsigned char>>&&, opcodetype&&)
Line
Count
Source
609
590
{
610
590
    CScript ret;
611
590
    int cnt{0};
612
613
590
    ([&ret, &cnt] (Ts&& input) {
614
590
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
590
            if (cnt == 0) {
617
590
                ret = std::forward<Ts>(input);
618
590
            } else {
619
590
                ret.insert(ret.end(), input.begin(), input.end());
620
590
            }
621
590
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
590
            ret << input;
624
590
        }
625
590
        cnt++;
626
590
    } (std::forward<Ts>(inputs)), ...);
627
628
590
    return ret;
629
590
}
CScript BuildScript<unsigned int const&, opcodetype>(unsigned int const&, opcodetype&&)
Line
Count
Source
609
7.66k
{
610
7.66k
    CScript ret;
611
7.66k
    int cnt{0};
612
613
7.66k
    ([&ret, &cnt] (Ts&& input) {
614
7.66k
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
7.66k
            if (cnt == 0) {
617
7.66k
                ret = std::forward<Ts>(input);
618
7.66k
            } else {
619
7.66k
                ret.insert(ret.end(), input.begin(), input.end());
620
7.66k
            }
621
7.66k
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
7.66k
            ret << input;
624
7.66k
        }
625
7.66k
        cnt++;
626
7.66k
    } (std::forward<Ts>(inputs)), ...);
627
628
7.66k
    return ret;
629
7.66k
}
CScript BuildScript<opcodetype, int, opcodetype, opcodetype, std::vector<unsigned char, std::allocator<unsigned char>> const&, opcodetype>(opcodetype&&, int&&, opcodetype&&, opcodetype&&, std::vector<unsigned char, std::allocator<unsigned char>> const&, opcodetype&&)
Line
Count
Source
609
525
{
610
525
    CScript ret;
611
525
    int cnt{0};
612
613
525
    ([&ret, &cnt] (Ts&& input) {
614
525
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
525
            if (cnt == 0) {
617
525
                ret = std::forward<Ts>(input);
618
525
            } else {
619
525
                ret.insert(ret.end(), input.begin(), input.end());
620
525
            }
621
525
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
525
            ret << input;
624
525
        }
625
525
        cnt++;
626
525
    } (std::forward<Ts>(inputs)), ...);
627
628
525
    return ret;
629
525
}
CScript BuildScript<opcodetype, CScript&, opcodetype>(opcodetype&&, CScript&, opcodetype&&)
Line
Count
Source
609
7.82k
{
610
7.82k
    CScript ret;
611
7.82k
    int cnt{0};
612
613
7.82k
    ([&ret, &cnt] (Ts&& input) {
614
7.82k
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
7.82k
            if (cnt == 0) {
617
7.82k
                ret = std::forward<Ts>(input);
618
7.82k
            } else {
619
7.82k
                ret.insert(ret.end(), input.begin(), input.end());
620
7.82k
            }
621
7.82k
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
7.82k
            ret << input;
624
7.82k
        }
625
7.82k
        cnt++;
626
7.82k
    } (std::forward<Ts>(inputs)), ...);
627
628
7.82k
    return ret;
629
7.82k
}
CScript BuildScript<opcodetype, CScript&>(opcodetype&&, CScript&)
Line
Count
Source
609
1.48k
{
610
1.48k
    CScript ret;
611
1.48k
    int cnt{0};
612
613
1.48k
    ([&ret, &cnt] (Ts&& input) {
614
1.48k
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
1.48k
            if (cnt == 0) {
617
1.48k
                ret = std::forward<Ts>(input);
618
1.48k
            } else {
619
1.48k
                ret.insert(ret.end(), input.begin(), input.end());
620
1.48k
            }
621
1.48k
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
1.48k
            ret << input;
624
1.48k
        }
625
1.48k
        cnt++;
626
1.48k
    } (std::forward<Ts>(inputs)), ...);
627
628
1.48k
    return ret;
629
1.48k
}
CScript BuildScript<CScript, opcodetype>(CScript&&, opcodetype&&)
Line
Count
Source
609
1.65M
{
610
1.65M
    CScript ret;
611
1.65M
    int cnt{0};
612
613
1.65M
    ([&ret, &cnt] (Ts&& input) {
614
1.65M
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
1.65M
            if (cnt == 0) {
617
1.65M
                ret = std::forward<Ts>(input);
618
1.65M
            } else {
619
1.65M
                ret.insert(ret.end(), input.begin(), input.end());
620
1.65M
            }
621
1.65M
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
1.65M
            ret << input;
624
1.65M
        }
625
1.65M
        cnt++;
626
1.65M
    } (std::forward<Ts>(inputs)), ...);
627
628
1.65M
    return ret;
629
1.65M
}
CScript BuildScript<opcodetype, opcodetype, CScript&, opcodetype>(opcodetype&&, opcodetype&&, CScript&, opcodetype&&)
Line
Count
Source
609
145
{
610
145
    CScript ret;
611
145
    int cnt{0};
612
613
145
    ([&ret, &cnt] (Ts&& input) {
614
145
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
145
            if (cnt == 0) {
617
145
                ret = std::forward<Ts>(input);
618
145
            } else {
619
145
                ret.insert(ret.end(), input.begin(), input.end());
620
145
            }
621
145
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
145
            ret << input;
624
145
        }
625
145
        cnt++;
626
145
    } (std::forward<Ts>(inputs)), ...);
627
628
145
    return ret;
629
145
}
CScript BuildScript<opcodetype, opcodetype, opcodetype, CScript&, opcodetype>(opcodetype&&, opcodetype&&, opcodetype&&, CScript&, opcodetype&&)
Line
Count
Source
609
24
{
610
24
    CScript ret;
611
24
    int cnt{0};
612
613
24
    ([&ret, &cnt] (Ts&& input) {
614
24
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
24
            if (cnt == 0) {
617
24
                ret = std::forward<Ts>(input);
618
24
            } else {
619
24
                ret.insert(ret.end(), input.begin(), input.end());
620
24
            }
621
24
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
24
            ret << input;
624
24
        }
625
24
        cnt++;
626
24
    } (std::forward<Ts>(inputs)), ...);
627
628
24
    return ret;
629
24
}
CScript BuildScript<opcodetype>(opcodetype&&)
Line
Count
Source
609
1.37k
{
610
1.37k
    CScript ret;
611
1.37k
    int cnt{0};
612
613
1.37k
    ([&ret, &cnt] (Ts&& input) {
614
1.37k
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
1.37k
            if (cnt == 0) {
617
1.37k
                ret = std::forward<Ts>(input);
618
1.37k
            } else {
619
1.37k
                ret.insert(ret.end(), input.begin(), input.end());
620
1.37k
            }
621
1.37k
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
1.37k
            ret << input;
624
1.37k
        }
625
1.37k
        cnt++;
626
1.37k
    } (std::forward<Ts>(inputs)), ...);
627
628
1.37k
    return ret;
629
1.37k
}
CScript BuildScript<CScript, CScript&>(CScript&&, CScript&)
Line
Count
Source
609
1.11k
{
610
1.11k
    CScript ret;
611
1.11k
    int cnt{0};
612
613
1.11k
    ([&ret, &cnt] (Ts&& input) {
614
1.11k
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
1.11k
            if (cnt == 0) {
617
1.11k
                ret = std::forward<Ts>(input);
618
1.11k
            } else {
619
1.11k
                ret.insert(ret.end(), input.begin(), input.end());
620
1.11k
            }
621
1.11k
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
1.11k
            ret << input;
624
1.11k
        }
625
1.11k
        cnt++;
626
1.11k
    } (std::forward<Ts>(inputs)), ...);
627
628
1.11k
    return ret;
629
1.11k
}
CScript BuildScript<CScript, CScript&, opcodetype>(CScript&&, CScript&, opcodetype&&)
Line
Count
Source
609
9.31k
{
610
9.31k
    CScript ret;
611
9.31k
    int cnt{0};
612
613
9.31k
    ([&ret, &cnt] (Ts&& input) {
614
9.31k
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
9.31k
            if (cnt == 0) {
617
9.31k
                ret = std::forward<Ts>(input);
618
9.31k
            } else {
619
9.31k
                ret.insert(ret.end(), input.begin(), input.end());
620
9.31k
            }
621
9.31k
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
9.31k
            ret << input;
624
9.31k
        }
625
9.31k
        cnt++;
626
9.31k
    } (std::forward<Ts>(inputs)), ...);
627
628
9.31k
    return ret;
629
9.31k
}
CScript BuildScript<CScript, opcodetype, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, opcodetype&&, CScript&, opcodetype&&)
Line
Count
Source
609
150
{
610
150
    CScript ret;
611
150
    int cnt{0};
612
613
150
    ([&ret, &cnt] (Ts&& input) {
614
150
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
150
            if (cnt == 0) {
617
150
                ret = std::forward<Ts>(input);
618
150
            } else {
619
150
                ret.insert(ret.end(), input.begin(), input.end());
620
150
            }
621
150
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
150
            ret << input;
624
150
        }
625
150
        cnt++;
626
150
    } (std::forward<Ts>(inputs)), ...);
627
628
150
    return ret;
629
150
}
CScript BuildScript<CScript, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, CScript&, opcodetype&&)
Line
Count
Source
609
57
{
610
57
    CScript ret;
611
57
    int cnt{0};
612
613
57
    ([&ret, &cnt] (Ts&& input) {
614
57
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
57
            if (cnt == 0) {
617
57
                ret = std::forward<Ts>(input);
618
57
            } else {
619
57
                ret.insert(ret.end(), input.begin(), input.end());
620
57
            }
621
57
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
57
            ret << input;
624
57
        }
625
57
        cnt++;
626
57
    } (std::forward<Ts>(inputs)), ...);
627
628
57
    return ret;
629
57
}
CScript BuildScript<opcodetype, CScript&, opcodetype, CScript&, opcodetype>(opcodetype&&, CScript&, opcodetype&&, CScript&, opcodetype&&)
Line
Count
Source
609
1.05k
{
610
1.05k
    CScript ret;
611
1.05k
    int cnt{0};
612
613
1.05k
    ([&ret, &cnt] (Ts&& input) {
614
1.05k
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
1.05k
            if (cnt == 0) {
617
1.05k
                ret = std::forward<Ts>(input);
618
1.05k
            } else {
619
1.05k
                ret.insert(ret.end(), input.begin(), input.end());
620
1.05k
            }
621
1.05k
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
1.05k
            ret << input;
624
1.05k
        }
625
1.05k
        cnt++;
626
1.05k
    } (std::forward<Ts>(inputs)), ...);
627
628
1.05k
    return ret;
629
1.05k
}
CScript BuildScript<CScript, opcodetype, CScript&, opcodetype, CScript&, opcodetype>(CScript&&, opcodetype&&, CScript&, opcodetype&&, CScript&, opcodetype&&)
Line
Count
Source
609
262
{
610
262
    CScript ret;
611
262
    int cnt{0};
612
613
262
    ([&ret, &cnt] (Ts&& input) {
614
262
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
262
            if (cnt == 0) {
617
262
                ret = std::forward<Ts>(input);
618
262
            } else {
619
262
                ret.insert(ret.end(), input.begin(), input.end());
620
262
            }
621
262
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
262
            ret << input;
624
262
        }
625
262
        cnt++;
626
262
    } (std::forward<Ts>(inputs)), ...);
627
628
262
    return ret;
629
262
}
CScript BuildScript<unsigned int const&>(unsigned int const&)
Line
Count
Source
609
212
{
610
212
    CScript ret;
611
212
    int cnt{0};
612
613
212
    ([&ret, &cnt] (Ts&& input) {
614
212
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
212
            if (cnt == 0) {
617
212
                ret = std::forward<Ts>(input);
618
212
            } else {
619
212
                ret.insert(ret.end(), input.begin(), input.end());
620
212
            }
621
212
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
212
            ret << input;
624
212
        }
625
212
        cnt++;
626
212
    } (std::forward<Ts>(inputs)), ...);
627
628
212
    return ret;
629
212
}
CScript BuildScript<CScript, std::vector<unsigned char, std::allocator<unsigned char>>>(CScript&&, std::vector<unsigned char, std::allocator<unsigned char>>&&)
Line
Count
Source
609
445
{
610
445
    CScript ret;
611
445
    int cnt{0};
612
613
445
    ([&ret, &cnt] (Ts&& input) {
614
445
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
445
            if (cnt == 0) {
617
445
                ret = std::forward<Ts>(input);
618
445
            } else {
619
445
                ret.insert(ret.end(), input.begin(), input.end());
620
445
            }
621
445
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
445
            ret << input;
624
445
        }
625
445
        cnt++;
626
445
    } (std::forward<Ts>(inputs)), ...);
627
628
445
    return ret;
629
445
}
CScript BuildScript<CScript, unsigned long, opcodetype>(CScript&&, unsigned long&&, opcodetype&&)
Line
Count
Source
609
212
{
610
212
    CScript ret;
611
212
    int cnt{0};
612
613
212
    ([&ret, &cnt] (Ts&& input) {
614
212
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
212
            if (cnt == 0) {
617
212
                ret = std::forward<Ts>(input);
618
212
            } else {
619
212
                ret.insert(ret.end(), input.begin(), input.end());
620
212
            }
621
212
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
212
            ret << input;
624
212
        }
625
212
        cnt++;
626
212
    } (std::forward<Ts>(inputs)), ...);
627
628
212
    return ret;
629
212
}
CScript BuildScript<std::vector<unsigned char, std::allocator<unsigned char>>, opcodetype>(std::vector<unsigned char, std::allocator<unsigned char>>&&, opcodetype&&)
Line
Count
Source
609
52
{
610
52
    CScript ret;
611
52
    int cnt{0};
612
613
52
    ([&ret, &cnt] (Ts&& input) {
614
52
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
52
            if (cnt == 0) {
617
52
                ret = std::forward<Ts>(input);
618
52
            } else {
619
52
                ret.insert(ret.end(), input.begin(), input.end());
620
52
            }
621
52
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
52
            ret << input;
624
52
        }
625
52
        cnt++;
626
52
    } (std::forward<Ts>(inputs)), ...);
627
628
52
    return ret;
629
52
}
CScript BuildScript<CScript, std::vector<unsigned char, std::allocator<unsigned char>>, opcodetype>(CScript&&, std::vector<unsigned char, std::allocator<unsigned char>>&&, opcodetype&&)
Line
Count
Source
609
145
{
610
145
    CScript ret;
611
145
    int cnt{0};
612
613
145
    ([&ret, &cnt] (Ts&& input) {
614
145
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
145
            if (cnt == 0) {
617
145
                ret = std::forward<Ts>(input);
618
145
            } else {
619
145
                ret.insert(ret.end(), input.begin(), input.end());
620
145
            }
621
145
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
145
            ret << input;
624
145
        }
625
145
        cnt++;
626
145
    } (std::forward<Ts>(inputs)), ...);
627
628
145
    return ret;
629
145
}
CScript BuildScript<CScript, unsigned int const&, opcodetype>(CScript&&, unsigned int const&, opcodetype&&)
Line
Count
Source
609
600
{
610
600
    CScript ret;
611
600
    int cnt{0};
612
613
600
    ([&ret, &cnt] (Ts&& input) {
614
600
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
600
            if (cnt == 0) {
617
600
                ret = std::forward<Ts>(input);
618
600
            } else {
619
600
                ret.insert(ret.end(), input.begin(), input.end());
620
600
            }
621
600
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
600
            ret << input;
624
600
        }
625
600
        cnt++;
626
600
    } (std::forward<Ts>(inputs)), ...);
627
628
600
    return ret;
629
600
}
CScript BuildScript<long const&>(long const&)
Line
Count
Source
609
16
{
610
16
    CScript ret;
611
16
    int cnt{0};
612
613
16
    ([&ret, &cnt] (Ts&& input) {
614
16
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
16
            if (cnt == 0) {
617
16
                ret = std::forward<Ts>(input);
618
16
            } else {
619
16
                ret.insert(ret.end(), input.begin(), input.end());
620
16
            }
621
16
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
16
            ret << input;
624
16
        }
625
16
        cnt++;
626
16
    } (std::forward<Ts>(inputs)), ...);
627
628
16
    return ret;
629
16
}
CScript BuildScript<unsigned long const&>(unsigned long const&)
Line
Count
Source
609
230
{
610
230
    CScript ret;
611
230
    int cnt{0};
612
613
230
    ([&ret, &cnt] (Ts&& input) {
614
230
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
230
            if (cnt == 0) {
617
230
                ret = std::forward<Ts>(input);
618
230
            } else {
619
230
                ret.insert(ret.end(), input.begin(), input.end());
620
230
            }
621
230
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
230
            ret << input;
624
230
        }
625
230
        cnt++;
626
230
    } (std::forward<Ts>(inputs)), ...);
627
628
230
    return ret;
629
230
}
CScript BuildScript<int const&>(int const&)
Line
Count
Source
609
230
{
610
230
    CScript ret;
611
230
    int cnt{0};
612
613
230
    ([&ret, &cnt] (Ts&& input) {
614
230
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
230
            if (cnt == 0) {
617
230
                ret = std::forward<Ts>(input);
618
230
            } else {
619
230
                ret.insert(ret.end(), input.begin(), input.end());
620
230
            }
621
230
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
230
            ret << input;
624
230
        }
625
230
        cnt++;
626
230
    } (std::forward<Ts>(inputs)), ...);
627
628
230
    return ret;
629
230
}
CScript BuildScript<unsigned int&>(unsigned int&)
Line
Count
Source
609
10.4k
{
610
10.4k
    CScript ret;
611
10.4k
    int cnt{0};
612
613
10.4k
    ([&ret, &cnt] (Ts&& input) {
614
10.4k
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
10.4k
            if (cnt == 0) {
617
10.4k
                ret = std::forward<Ts>(input);
618
10.4k
            } else {
619
10.4k
                ret.insert(ret.end(), input.begin(), input.end());
620
10.4k
            }
621
10.4k
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
10.4k
            ret << input;
624
10.4k
        }
625
10.4k
        cnt++;
626
10.4k
    } (std::forward<Ts>(inputs)), ...);
627
628
10.4k
    return ret;
629
10.4k
}
CScript BuildScript<unsigned long&>(unsigned long&)
Line
Count
Source
609
177
{
610
177
    CScript ret;
611
177
    int cnt{0};
612
613
177
    ([&ret, &cnt] (Ts&& input) {
614
177
        if constexpr (std::is_same_v<std::remove_cv_t<std::remove_reference_t<Ts>>, CScript>) {
615
            // If it is a CScript, extend ret with it. Move or copy the first element instead.
616
177
            if (cnt == 0) {
617
177
                ret = std::forward<Ts>(input);
618
177
            } else {
619
177
                ret.insert(ret.end(), input.begin(), input.end());
620
177
            }
621
177
        } else {
622
            // Otherwise invoke CScript::operator<<.
623
177
            ret << input;
624
177
        }
625
177
        cnt++;
626
177
    } (std::forward<Ts>(inputs)), ...);
627
628
177
    return ret;
629
177
}
630
631
#endif // BITCOIN_SCRIPT_SCRIPT_H