Short answer: no, you cannot do that.
NOTE: I saw the first answer which quotes the standard but I believe it is worth showing also my tests.
va_start
is defined like this:
Visual 6: #define va_start(ap,v) ( ap = (va_list)&v + _INTSIZEOF(v) )
Visual 8: #define _crt_va_start(ap,v) ( __va_start(&ap, _ADDRESSOF(v), _SLOTSIZEOF(v), \
__alignof(v), _ADDRESSOF(v)) )
With this code:
#include <cstdio>
int main()
{
char c;
char &rc = c;
int i;
int &ri = i;
printf("char ref:%d\n", sizeof(rc));
printf("int ref:%d\n", sizeof(ri));
return 0;
}
output
char ref:1
int ref:4
Since at implementation level references are passed on stack in a similar way to pointers this represents a problem since the size differs (it is because of the macro which computes the size of the type not taking into account that the parameter is actually a reference, which is not constant but depends on actual size of the type).