Hacker News new | ask | show | jobs
by comex 4975 days ago
It's possible to do exactly that (a function that initialized a vector with its arguments) in C++ with variadic templates...

You might end up in trouble if you did something like

    auto v = vec(
                  vec(1.2, 3.4),
                  vec(0)
                )
not sure how well other languages deal with that.