| 18 | */ |
| 19 | template<typename... Args> |
| 20 | inline 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. */ |
| 30 | template<typename V> |