MCPcopy Create free account
hub / github.com/ElementsProject/elements / Vector

Function Vector

src/util/vector.h:20–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 15

GetAllDestinationsForKeyFunction · 0.85
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

Calls 2

emplace_backMethod · 0.80
reserveMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.68