Is it possible for the autotester to allow downloading the latest build
that passed testing?
Is it possible to create a template turning any value into a lvalue?
This would be helpful if a function expects a reference but you dont
need the result of the change:
///decode(S)(in S str, ref size_t index);
auto c = std.utf.decode(some_string, lval!0);
On 01/02/2012 03:02 PM, Joshua Reusch wrote:
Is it possible to create a template turning any value into a lvalue?
This would be helpful if a function expects a reference but you dont
need the result of the change:
///decode(S)(in S str, ref size_t index);
auto c = std.utf.decode(some_string,
On Mon, 02 Jan 2012 15:02:30 +0100, Joshua Reusch yos...@arkandos.de
wrote:
Is it possible to create a template turning any value into a lvalue?
This would be helpful if a function expects a reference but you dont
need the result of the change:
///decode(S)(in S str, ref size_t index);
Am 02.01.2012 22:13, schrieb Simen Kjærås:
On Mon, 02 Jan 2012 15:02:30 +0100, Joshua Reusch yos...@arkandos.de
wrote:
Is it possible to create a template turning any value into a lvalue?
This would be helpful if a function expects a reference but you dont
need the result of the change:
auto r = new int[][5];
this is ok
auto r = new int[][];
this is not ok
Error: new can only create structs, dynamic arrays or class objects
, not int[][]'s
why?
On 01/02/2012 11:04 PM, RenatoL wrote:
auto r = new int[][5];
this is ok
auto r = new int[][];
this is not ok
Error: new can only create structs, dynamic arrays or class objects
, not int[][]'s
why?
What would you expect the code to do?
What you are trying to achieve is similar to:
class
Just curious... the answer of the compiler it's a bit unclear to
me...
T[] is a dynamic array of type T.
T[][] is a dynamic array of T[]. But this doesn't work. Why?
On 01/02/2012 11:21 PM, RenatoL wrote:
Just curious... the answer of the compiler it's a bit unclear to
me...
T[] is a dynamic array of type T.
T[][] is a dynamic array of T[]. But this doesn't work. Why?
It does work. Why do you think it does not?
T[] a; // ok
T[][] b;
Am 02.01.2012 23:33, schrieb Timon Gehr:
On 01/02/2012 11:21 PM, RenatoL wrote:
Just curious... the answer of the compiler it's a bit unclear to
me...
T[] is a dynamic array of type T.
T[][] is a dynamic array of T[]. But this doesn't work. Why?
It does work. Why do you think it does not?
I have:
auto r = new int[][];
Error: new can only create structs, dynamic arrays or class objects
, not int[][]'s
while
auto r = new int[][3];
is ok.
On 01/03/2012 12:03 AM, RenatoL wrote:
I have:
auto r = new int[][];
Error: new can only create structs, dynamic arrays or class objects
, not int[][]'s
while
auto r = new int[][3];
is ok.
new int[][3] is an alternate form of new int[][](3); new int[][3]
allocates an int[][] with 3
On 01/03/2012 12:02 AM, Mafi wrote:
Am 02.01.2012 23:33, schrieb Timon Gehr:
On 01/02/2012 11:21 PM, RenatoL wrote:
Just curious... the answer of the compiler it's a bit unclear to
me...
T[] is a dynamic array of type T.
T[][] is a dynamic array of T[]. But this doesn't work. Why?
It does
On 3 January 2012 00:27, Timon Gehr timon.g...@gmx.ch wrote:
On 01/03/2012 12:03 AM, RenatoL wrote:
I have:
auto r = new int[][];
Error: new can only create structs, dynamic arrays or class objects
, not int[][]'s
while
auto r = new int[][3];
is ok.
new int[][3] is an alternate
RenatoL wrote:
Error: new can only create structs,
dynamic arrays or class objects, not int[][]'s
There is an error in the error message:
new can only create _static_ arrays.
-manfred
On Monday, January 02, 2012 23:49:36 Manfred Nowak wrote:
RenatoL wrote:
Error: new can only create structs,
dynamic arrays or class objects, not int[][]'s
There is an error in the error message:
new can only create _static_ arrays.
Um no. new is used for creating _dynamic_ arrays, not
On 01/03/2012 12:46 AM, Matej Nanut wrote:
On 3 January 2012 00:27, Timon Gehr timon.g...@gmx.ch
mailto:timon.g...@gmx.ch wrote:
On 01/03/2012 12:03 AM, RenatoL wrote:
I have:
auto r = new int[][];
Error: new can only create structs, dynamic arrays or class
Thank you both.
I've created a D DLL [http://dlang.org/dll.html], then I've loaded it from a C
program [compiled with dmc].
However, I'd want to be able to call it from a C program compiled with MSVC,
and I got a link error - unresolved external symbol [link testdll.obj
/implib:mydll.lib
Jonathan M Davis wrote:
new is used for creating _dynamic_ arrays, not static arrays.
Correct, my fault. I meant something like statically initialized dynamic,
because `new' currently needs an `uint' number to allocate some space for
the elements of the outermost array.
The posting shows,
On 1/3/2012 10:02 AM, DNewbie wrote:
Thank you both.
I've created a D DLL [http://dlang.org/dll.html], then I've loaded it from a C
program [compiled with dmc].
However, I'd want to be able to call it from a C program compiled with MSVC,
and I got a link error - unresolved external symbol
Maybe I'm wrong, but IIRC objconv won't work on import libs.
But there are other ways to do it: http://support.microsoft.com/kb/131313
Resolved.
Thanks everyone.
On Tue, Jan 3, 2012, at 04:49 AM, Andrej Mitrovic wrote:
Maybe I'm wrong, but IIRC objconv won't work on import libs.
But there are other ways to do it: http://support.microsoft.com/kb/131313
--
D
22 matches
Mail list logo