File tree Expand file tree Collapse file tree 4 files changed +26
-11
lines changed Expand file tree Collapse file tree 4 files changed +26
-11
lines changed Original file line number Diff line number Diff line change @@ -297,6 +297,7 @@ BITCOIN_CORE_H = \
297
297
util/golombrice.h \
298
298
util/hash_type.h \
299
299
util/hasher.h \
300
+ util/insert.h \
300
301
util/macros.h \
301
302
util/message.h \
302
303
util/moneystr.h \
Original file line number Diff line number Diff line change
1
+ // Copyright (c) 2023 The Bitcoin Core developers
2
+ // Distributed under the MIT software license, see the accompanying
3
+ // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
+
5
+ #ifndef BITCOIN_UTIL_INSERT_H
6
+ #define BITCOIN_UTIL_INSERT_H
7
+
8
+ #include < set>
9
+
10
+ namespace util {
11
+
12
+ // ! Simplification of std insertion
13
+ template <typename Tdst, typename Tsrc>
14
+ inline void insert (Tdst& dst, const Tsrc& src) {
15
+ dst.insert (dst.begin (), src.begin (), src.end ());
16
+ }
17
+ template <typename TsetT, typename Tsrc>
18
+ inline void insert (std::set<TsetT>& dst, const Tsrc& src) {
19
+ dst.insert (src.begin (), src.end ());
20
+ }
21
+
22
+ } // namespace util
23
+
24
+ #endif // BITCOIN_UTIL_INSERT_H
Original file line number Diff line number Diff line change @@ -38,16 +38,6 @@ int GetNumCores();
38
38
39
39
namespace util {
40
40
41
- // ! Simplification of std insertion
42
- template <typename Tdst, typename Tsrc>
43
- inline void insert (Tdst& dst, const Tsrc& src) {
44
- dst.insert (dst.begin (), src.begin (), src.end ());
45
- }
46
- template <typename TsetT, typename Tsrc>
47
- inline void insert (std::set<TsetT>& dst, const Tsrc& src) {
48
- dst.insert (src.begin (), src.end ());
49
- }
50
-
51
41
/* *
52
42
* Helper function to access the contained object of a std::any instance.
53
43
* Returns a pointer to the object if passed instance has a value and the type
Original file line number Diff line number Diff line change 11
11
#include < policy/feerate.h>
12
12
#include < primitives/transaction.h>
13
13
#include < random.h>
14
- #include < util/system.h>
15
14
#include < util/check.h>
15
+ #include < util/insert.h>
16
16
#include < util/result.h>
17
17
18
18
#include < optional>
You can’t perform that action at this time.
0 commit comments