You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added are:
* Vector(arg1,arg2,arg3,...) constructs a vector with the specified
arguments as elements. The vector's type is derived from the
arguments. If some of the arguments are rvalue references, they
will be moved into place rather than copied (which can't be achieved
using list initialization).
* Cat(vector1,vector2) returns a concatenation of the two vectors,
efficiently moving elements when relevant.
Vector generalizes (and replaces) the Singleton function in
src/descriptor.cpp, and Cat replaces the Cat function in bech32.cpp
Copy file name to clipboardExpand all lines: src/bech32.cpp
+1-7Lines changed: 1 addition & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@
3
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
// 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_VECTOR_H
6
+
#defineBITCOIN_UTIL_VECTOR_H
7
+
8
+
#include<initializer_list>
9
+
#include<type_traits>
10
+
#include<vector>
11
+
12
+
/** Construct a vector with the specified elements.
13
+
*
14
+
* This is preferable over the list initializing constructor of std::vector:
15
+
* - It automatically infers the element type from its arguments.
16
+
* - If any arguments are rvalue references, they will be moved into the vector
// The line below uses the trick from https://www.experts-exchange.com/articles/32502/None-recursive-variadic-templates-with-std-initializer-list.html
0 commit comments