Re: What is the proper way to handle pointers in variable arguments list?

2012-10-28 Thread Tyro[17]
On 10/28/12 5:16 PM, Simen Kjaeraas wrote: On 2012-08-28 22:10, Tyro[17] wrote: On 10/28/12 4:44 PM, Dmitry Olshansky wrote: On 29-Oct-12 00:36, Tyro[17] wrote: The following fails because the compiler assumes I am trying to dereference non-pointer variables. Can this be done? void main() {

Re: What is the proper way to handle pointers in variable arguments list?

2012-10-28 Thread Simen Kjaeraas
On 2012-08-28 22:10, Tyro[17] wrote: On 10/28/12 4:44 PM, Dmitry Olshansky wrote: On 29-Oct-12 00:36, Tyro[17] wrote: The following fails because the compiler assumes I am trying to dereference non-pointer variables. Can this be done? void main() { int i; int* pi; double d;

Re: What is the proper way to handle pointers in variable arguments list?

2012-10-28 Thread Tyro[17]
On 10/28/12 4:44 PM, Dmitry Olshansky wrote: On 29-Oct-12 00:36, Tyro[17] wrote: The following fails because the compiler assumes I am trying to dereference non-pointer variables. Can this be done? void main() { int i; int* pi; double d; double* pd; char c; char* p

Re: What is the proper way to handle pointers in variable arguments list?

2012-10-28 Thread Dmitry Olshansky
On 29-Oct-12 00:36, Tyro[17] wrote: The following fails because the compiler assumes I am trying to dereference non-pointer variables. Can this be done? void main() { int i; int* pi; double d; double* pd; char c; char* pc; scan(i, pi, d, pd, c, pc); } void sc

What is the proper way to handle pointers in variable arguments list?

2012-10-28 Thread Tyro[17]
The following fails because the compiler assumes I am trying to dereference non-pointer variables. Can this be done? void main() { int i; int* pi; double d; double* pd; char c; char* pc; scan(i, pi, d, pd, c, pc); } void scan(A...)(ref A data) { import std.trait