Types A!1 and A!1u not considered equal?

2011-10-21 Thread Tobias Brandt
Consider the following program:  class A(uint N) {}  void foo(uint N)(A!N) {}  void main()  {      auto a = new A!1;                           // compiles      foo(new A!1);                               // error      foo(new A!1u);                              // compiles      foo(cast(A!1u) A!1

Re: Types A!1 and A!1u not considered equal?

2011-10-21 Thread Tobias Brandt
On 21 October 2011 10:01, Jonathan M Davis wrote: > On Friday, October 21, 2011 11:57:50 Gor Gyolchanyan wrote: >> That's because implicit casts in D are much more strict, then those in >> C/C++. Such seemingly intuitive cats, e.g. from long to int are not >> performed due to potential loss of dat

Re: Fortran DLL and D

2012-03-13 Thread Tobias Brandt
Fortran uses pass-by-ref by default. You could try integer, value :: i in the Fortran function declaration, OR *int in the MyHandler declaration.

Re: Fortran DLL and D

2012-03-13 Thread Tobias Brandt
On 13 March 2012 23:53, Michael wrote: > On Tuesday, 13 March 2012 at 22:30:02 UTC, Tobias Brandt wrote: >> >> Fortran uses pass-by-ref by default. You could try >> >>    integer, value :: i >> >> in the Fortran function declaration, OR >> >>

Re: OT: phobos name

2012-07-31 Thread Tobias Brandt
On 31 July 2012 15:16, akaz wrote: > According to Wikipedia: > > "Phobos (Ancient Greek: Φόβος, pronounced [pʰóbos], meaning "fear" or > "terror") is the personification of fear in Greek mythology." > > http://en.wikipedia.org/wiki/Phobos_(mythology) > > I just discovered that. I find it surprisin