Re: X header like functionality

2012-07-08 Thread Lukasz
On Sunday, 8 July 2012 at 08:05:58 UTC, Mattias wrote: Hi, I spent some time recently learning D. I am curious about the best way to implement something like X-includes in C. I.e. where one use macros that you redefine at the include point. This is indispensable sometimes for keeping code in s

Re: K&R-style variadic functions

2012-07-17 Thread Lukasz
I was sure that if function is declared with empty () than you can call it with any arguments you imagine, as it is in following examples. = ex. 1 <*> cat main.c void a() { } int main() { a(1, 2, 3); return 0; } <*> gcc -Wall -Wextra -pedantic main.c <*> =

dmd: template.c:5540: Identifier* TemplateInstance::genIdent(Objects*): Assertion `global.errors' failed.

2012-07-23 Thread Lukasz
I hope someone will put this on bugzilla dmd loops endlessly on this code: import std.typecons; string bug(T..., U : tuple!T)(tuple!T t); dmd aborts on this code: import std.typecons; string bug(T, U : tuple!T)(tuple!T t); enum e = bug(tuple!int);

Re: dmd: template.c:5540: Identifier* TemplateInstance::genIdent(Objects*): Assertion `global.errors' failed.

2012-07-23 Thread Lukasz
On Monday, 23 July 2012 at 20:54:03 UTC, Nick Sabalausky wrote: On Mon, 23 Jul 2012 22:21:30 +0200 "Lukasz" wrote: I hope someone will put this on bugzilla dmd loops endlessly on this code: import std.typecons; string bug(T..., U : tuple!T)(tuple!T t); dmd abor

Use tango.core.Atomic.atomicLoad and atomicStore from Tango

2012-03-25 Thread Lukasz Durniat
Hi, When I use this function in program I have error during compiling proccess, so someone can show me how use(example) it in proper manner - without errors. I try find some samples or documentations but this dont help. Thanks for any help.

Re: Use tango.core.Atomic.atomicLoad and atomicStore from Tango

2012-03-25 Thread Lukasz Durniat
Here is code: import Integer = tango.text.convert.Integer; import tango.math.random.Random; import tango.core.Thread; import tango.core.Atomic; class MyThread :Thread { bool* log; this( bool* log ) { super(&run); this.log = log; } void run() {

Re: Use tango.core.Atomic.atomicLoad and atomicStore from Tango

2012-03-26 Thread Lukasz Durniat
Can somebody tell me what is wrong in my code?

Re: Use tango.core.Atomic.atomicLoad and atomicStore from Tango

2012-03-26 Thread Lukasz Durniat
Problem has been solved by me.