On Sunday, 10 January 2016 at 14:17:28 UTC, Adam D. Ruppe wrote:
A `const(void)[]` type can accept any array as input. void[] is
Ah, how i can forget about void[] !
Thanks Adam!
On Sunday, 10 January 2016 at 10:10:46 UTC, zabruk70 wrote:
void myFunc(char[] arg) { ubyte[] arg2 = cast(ubyte[]) arg; ...}
void myFunc(const(void)[] arg) {
const(ubyte)[] arg2 = cast(const(ubyte)[]) arg;
// use arg2
}
A `const(void)[]` type can accept any array as input. void[] is
a
On Sunday, 10 January 2016 at 11:13:00 UTC, Tobi G. wrote:
ubyte[] myFunc(T1,T2)(T1[] a, T2[] b)
Tobi, big thanks!!!
I should learn templates...
On Sunday, 10 January 2016 at 10:10:46 UTC, zabruk70 wrote:
Hello.
1st Novice question:
i want function, operates sometimes with char[], sometimes with
ubyte[].
internally it works with ubyte.
i can use overloading:
void myFunc(ubyte[] arg) {...};
void myFunc(char[] arg) { ubyte[] arg2 = cas
Hello.
1st Novice question:
i want function, operates sometimes with char[], sometimes with
ubyte[].
internally it works with ubyte.
i can use overloading:
void myFunc(ubyte[] arg) {...};
void myFunc(char[] arg) { ubyte[] arg2 = cast(ubyte[]) arg; ...}
It is OK. But i want 2 params (arg1, ar