Is this a common language for C++ proposals? "Horrible, terrible, terrifying, disgusted", you'd think this is describing Lexur'iga-serr'roth and not main(). http://open-std.org/JTC1/SC22/WG21/docs/papers/2017/p0781r0.html …
-
-
void fun(std::initializer_list<int> args) { for(int i : args) { printf("%d ", i); } } fun({1,2,3}); fun({42}); in contrast to std::vector or whatever it AFAIK doesn't usually heap-allocate in contrast to varargs its typesafe (but limited to one type)
-
in contrast to variadic template arguments (template<typename... Args>void fun(Args... args) { ... }) it doesn't have the template bloat for each usage of the function
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.