MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / Vector

Function Vector

src/util/vector.h:23–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21 */
22template<typename... Args>
23inline std::vector<std::common_type_t<Args...>> Vector(Args&&... args)
24{
25 std::vector<std::common_type_t<Args...>> ret;
26 ret.reserve(sizeof...(args));
27 // The line below uses the trick from https://www.experts-exchange.com/articles/32502/None-recursive-variadic-templates-with-std-initializer-list.html
28 (void)std::initializer_list<int>{(ret.emplace_back(std::forward<Args>(args)), 0)...};
29 return ret;
30}
31
32/** Concatenate two vectors, moving elements. */
33template<typename V>

Callers 15

BatchWriteMethod · 0.85
DescriptorImplMethod · 0.85
MakeScriptsMethod · 0.85
MakeScriptsMethod · 0.85
MakeScriptsMethod · 0.85
PKDescriptorMethod · 0.85
MakeScriptsMethod · 0.85
PKHDescriptorMethod · 0.85
MakeScriptsMethod · 0.85
WPKHDescriptorMethod · 0.85
ComboDescriptorMethod · 0.85
MakeScriptsMethod · 0.85

Calls 2

reserveMethod · 0.45
emplace_backMethod · 0.45

Tested by 2

BOOST_AUTO_TEST_CASEFunction · 0.68
BOOST_AUTO_TEST_CASEFunction · 0.68