Top "Variadic-functions" questions

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

Requiring at least one element in java variable argument list

In this code construct: public MyClass(Integer... numbers) { do_something_with(numbers[]); } is it possible to require that numbers contains …

java arguments minimum variadic-functions
How to create a polyvariadic haskell function?

I need a function which takes an arbitrary number of arguments (All of the same type), does something with them …

haskell variadic-functions function-parameter polyvariadic
java: how can i create a function that supports any number of parameters?

is it possible to create a function in java that supports any number of parameters and then to be able …

java variadic-functions
How do you call an Objective-C variadic method from Swift?

Supposing I have a class in Objective-c with a static method like this: + (NSError *)executeUpdateQuery:(NSString *)query, ...; How do I …

objective-c swift variadic-functions
Kotlin: Can you use named arguments for varargs?

For example, you might have function with a complicated signature and varargs: fun complicated(easy: Boolean = false, hard: Boolean = true, …

function kotlin default-value variadic-functions named-parameters
Is GCC mishandling a pointer to a va_list passed to a function?

The question 'Pass va_list or pointer to va_list?' has an answer which quotes the standard (ISO/IEC 9899:1999 …

c variadic-functions
Variadic functions parameters pass-through

Situation: I'm trying to write a simple fmt.Fprintf wrapper which takes a variable number of arguments. This is the …

go variadic-functions
Are there gotchas using varargs with reference parameters

I have this piece of code (summarized)... AnsiString working(AnsiString format,...) { va_list argptr; AnsiString buff; va_start(argptr, format); …

c++ reference variadic-functions
C++ variadic template function parameter with default value

I have a function which takes one parameter with a default value. Now I also want it to take a …

c++ c++11 default-value variadic-templates variadic-functions
How to reverse the order of arguments of a variadic template function?

I have a template function with varargs template arguments, like this template<typename Args...> void ascendingPrint(Args... args) { /* ... */ } …

c++ templates c++11 variadic-templates variadic-functions