diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-10-18 09:56:43 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-10-18 09:57:00 -0400 |
commit | 0ff7cd7d0c074448db636bcc73e7879b7e4b21ec (patch) | |
tree | 8c6513a72dbdd555ce5350036b2e26a2a2e265ae /src/interfaces/chain.cpp | |
parent | f2a094884d987465437a6300daa84de6f39c2322 (diff) | |
parent | 7d8d3e6a2ad827fa916e3909a18dedb9f7fdce43 (diff) |
Merge #16889: Add some general std::vector utility functions
7d8d3e6a2ad827fa916e3909a18dedb9f7fdce43 Add tests for util/vector.h's Cat and Vector (Pieter Wuille)
e65e61c812df90a56e3ce4a8e76c4b746766f387 Add some general std::vector utility functions (Pieter Wuille)
Pull request description:
This is another general improvement extracted from #16800 .
Two functions are 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 function in bech32.cpp
ACKs for top commit:
laanwj:
ACK 7d8d3e6a2ad827fa916e3909a18dedb9f7fdce43
MarcoFalke:
ACK 7d8d3e6a2ad827fa916e3909a18dedb9f7fdce43 (enjoyed reading the tests, but did not compile)
Tree-SHA512: 92325f14e90d7e7d9d920421979aec22bb0d730e0291362b4326cccc76f9c2d865bec33a797c5c0201773468c3773cb50ce52c8eee4c1ec1a4d10db5cf2b9d2a
Diffstat (limited to 'src/interfaces/chain.cpp')
0 files changed, 0 insertions, 0 deletions