Top "Variadic-functions" questions

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

Arrays.asList() not working as it should?

I have a float[] and i would like to get a list with the same elements. I could do the …

java arrays list variadic-functions
C++11: Number of Variadic Template Function Parameters?

How can I get a count of the number of arguments to a variadic template function? ie: template<typename... …

c++ c++11 variadic-templates variadic-functions
How can Scala receive multiple parameters in a method definition?

Java has: public void someMethod(int ... intArray) { // question: what is the equivalent to "..." // do something with intArray } how can I …

java scala variadic-functions
Java generics and varargs

I'd like to implement a function with both generics and varargs. public class Question { public static <A> void …

java generics types variadic-functions
Create a Map in Golang from database Rows

Basically after doing a query I'd like to take the resulting rows and produce a []map[string]interface{}, but I …

database go variadic-functions
What does __VA_ARGS__ in a macro mean?

/* Debugging */ #ifdef DEBUG_THRU_UART0 # define DEBUG(...) printString (__VA_ARGS__) #else void dummyFunc(void); # define DEBUG(...) dummyFunc() #endif I've seen …

c gcc variadic-macros variadic-functions
Python, default keyword arguments after variable length positional arguments

I thought I could use named parameters after variable-length positional parameters in a function call in Python 2, but I get …

python variadic-functions python-2.x named-parameters default-parameters
varargs in lambda functions in Python

Is it possible a lambda function to have variable number of arguments? For example, I want to write a metaclass, …

python lambda variadic-functions
Java SafeVarargs annotation, does a standard or best practice exist?

I've recently come across the java @SafeVarargs annotation. Googling for what makes a variadic function in Java unsafe left me …

java java-7 variadic-functions
How to pass variable length arguments as arguments on another function in Golang?

How to pass variable length arguments in Go? for example, I want to call func MyPrint(format string, args ...interface{}) { …

function go variadic-functions