Top "Variadic-functions" questions

A function is variadic if it can accept a variable number of arguments; that is, its arity is not fixed.

Groovy convert from List to var args for method call

I am using a plugin that provides email functionality as follows: class SendSesMail { //to void to(String ... _to) { this.to?.…

list groovy variadic-functions
How does Haskell printf work?

Haskell's type safety is second to none only to dependently-typed languages. But there is some deep magic going on with …

haskell printf variadic-functions polyvariadic
pass variable number of arguments in scala (2.8) case class to parent constructor

I was experimenting with variable constructor arguments for case classes in Scala, but am unable to pass them to the …

inheritance scala scala-2.8 variadic-functions
Why doesn't Java varargs support collections?

In my Java code I often use the very handy method(Class... args) varargs. As far as I know, they …

java collections language-features variadic-functions
Why use variadic arguments now when initializer lists are available?

I've been wondering what are the advantages of variadic arguments over initializer lists. Both offer the same ability - to …

c++ performance c++11 variadic-functions initializer-list
A function with variable number of arguments with known types, the c++11 way

I already know the stdarg.h way to have a function with variable arguments in c++ as discussed here for …

c++ templates c++11 variadic-templates variadic-functions
EnumSet from array, shortest variant?

I need an EnumSet from an array (which is given through a varargs method parameter). First, I was surprised that …

java arrays enums variadic-functions enumset
How to wrap a function using varargin and varargout?

mini-example: function varargout = wrapper(varargin) varargout = someFunction(varargin); That's how I'd do it first. But for example if someFunction = ndgrid …

matlab wrapper variadic-functions
Necessity of forward-declaring template functions

I recently created this example code to illustrate C++11 variadic template function usage. template <typename Head, typename... Tail> …

c++ c++11 variadic-functions variadic-templates one-definition-rule
Suppressing "ISO C99 requires rest arguments to be used"

Consider the following two macros: #define PNORM( v, s, ... ) { \ if( VERBOSITY_CHECK( v ) ) { \ if( ( errno = pthread_mutex_lock(&server.…

c gcc posix variadic-functions gcc-warning