Re: The is expression

2011-04-05 Thread Philippe Sigaud
thanks for your answer. If it is that complicated if I prefer explicit specialization, I think. But I do not quite understand that it is not possible to achieve this with a simple is expression (without a function like isAnA and using __traits) as the D language reference includes a very

Re: Is there an equivalent to toStringz for wide strings?

2011-04-05 Thread Andrej Mitrovic
On 4/5/11, Kagamin s...@here.lot wrote: toUTF16z it was in windows examples somewhere, I suppose. Great, it's in std.utf. Thanks!

Re: ElementType!(Range) problem

2011-04-05 Thread Philippe Sigaud
I get a untitled.d(32): Error: template instance ElementType!(listR) does not match template declaration ElementType(R) error. What could be the problem ? -- import std.stdio; import std.range; import std.container;

Re: incompatible types!

2011-04-05 Thread Philippe Sigaud
What's strange is that auto r3 = r1 + r2; works. Bug indeed...

Re: assumeSafeAppend inconsistent when multiple slices in use

2011-04-05 Thread Steven Schveighoffer
On Tue, 05 Apr 2011 15:24:46 -0400, simendsjo simen.end...@pandavre.com wrote: I don't know if this is an actual problem, but I don't understand the behavior. When one slice calls assumeSafeAppend, both slices is given control, that is, gets the parents capacity. You have to stop thinking of

Re: incompatible types!

2011-04-05 Thread Steven Schveighoffer
On Tue, 05 Apr 2011 15:48:36 -0400, Caligo iteronve...@gmail.com wrote: I searched the bugzilla and there are 'alias this' related bugs. Some of them are 2 years old and have not been fixed. There are many bugs in that category. inout I think is a prime example. I don't really know what to

time_t to simple date string conversion

2011-04-05 Thread Kai Meyer
I'm reading documentation on std.datetime, and it appears there are added features that I don't have in 2.51 (Linux). Did features like 'SysTime' get added after 2.51? Does anybody have a one-liner to convert a time_t to a date string that should work for me? -Kai Meyer

Re: time_t to simple date string conversion

2011-04-05 Thread Steven Schveighoffer
On Tue, 05 Apr 2011 17:24:11 -0400, Kai Meyer k...@unixlords.com wrote: I'm reading documentation on std.datetime, and it appears there are added features that I don't have in 2.51 (Linux). Did features like 'SysTime' get added after 2.51? Does anybody have a one-liner to convert a time_t

Re: time_t to simple date string conversion

2011-04-05 Thread Steven Schveighoffer
On Tue, 05 Apr 2011 17:40:12 -0400, Steven Schveighoffer schvei...@yahoo.com wrote: On Tue, 05 Apr 2011 17:24:11 -0400, Kai Meyer k...@unixlords.com wrote: I'm reading documentation on std.datetime, and it appears there are added features that I don't have in 2.51 (Linux). Did features

Re: time_t to simple date string conversion

2011-04-05 Thread Jonathan M Davis
I'm reading documentation on std.datetime, and it appears there are added features that I don't have in 2.51 (Linux). Did features like 'SysTime' get added after 2.51? Does anybody have a one-liner to convert a time_t to a date string that should work for me? std.datetime was completely

Re: time_t to simple date string conversion

2011-04-05 Thread Jonathan M Davis
On Tue, 05 Apr 2011 17:24:11 -0400, Kai Meyer k...@unixlords.com wrote: I'm reading documentation on std.datetime, and it appears there are added features that I don't have in 2.51 (Linux). Did features like 'SysTime' get added after 2.51? Does anybody have a one-liner to convert a

Re: time_t to simple date string conversion

2011-04-05 Thread Kai Meyer
On 04/05/2011 03:40 PM, Steven Schveighoffer wrote: On Tue, 05 Apr 2011 17:24:11 -0400, Kai Meyer k...@unixlords.com wrote: I'm reading documentation on std.datetime, and it appears there are added features that I don't have in 2.51 (Linux). Did features like 'SysTime' get added after 2.51?

Re: time_t to simple date string conversion

2011-04-05 Thread Jonathan M Davis
On 04/05/2011 03:59 PM, Jonathan M Davis wrote: I'm reading documentation on std.datetime, and it appears there are added features that I don't have in 2.51 (Linux). Did features like 'SysTime' get added after 2.51? Does anybody have a one-liner to convert a time_t to a date string

Re: time_t to simple date string conversion

2011-04-05 Thread Steven Schveighoffer
On Tue, 05 Apr 2011 18:20:02 -0400, Jonathan M Davis jmdavisp...@gmx.com wrote: toSimpleString (which toString calls) does give the short version of the month in it, but during the review process, a number of the folks reviewing it were against putting code in there relating to printing

Re: time_t to simple date string conversion

2011-04-05 Thread Jonathan M Davis
On Tue, 05 Apr 2011 18:20:02 -0400, Jonathan M Davis jmdavisp...@gmx.com wrote: toSimpleString (which toString calls) does give the short version of the month in it, but during the review process, a number of the folks reviewing it were against putting code in there relating to

Re: incompatible types!

2011-04-05 Thread Caligo
It's just frustrating, that's all. Writing thousands of lines of code and having everything stop because of a compiler bug is just frustrating. I know progress is being made, and all that is appreciated. But, I don't remember ever hearing anything about D2 being in beta. If anything, I

Re: incompatible types!

2011-04-05 Thread Steven Schveighoffer
On Tue, 05 Apr 2011 19:37:15 -0400, Caligo iteronve...@gmail.com wrote: It's just frustrating, that's all. Writing thousands of lines of code and having everything stop because of a compiler bug is just frustrating. I completely understand. It's why I have to periodically stop using D.

Re: incompatible types!

2011-04-05 Thread Jonathan M Davis
On Tue, 05 Apr 2011 19:37:15 -0400, Caligo iteronve...@gmail.com wrote: It's just frustrating, that's all. Writing thousands of lines of code and having everything stop because of a compiler bug is just frustrating. I completely understand. It's why I have to periodically stop using D.

How about a handy way of wrapping all function parameters?

2011-04-05 Thread Andrej Mitrovic
E.g. this code: class Foo { int wndProc(uint msg, int wParam, int lParam) { return 0; } } class Bar : Foo { override int wndProc(uint msg, int wParam, int lParam) { switch(msg) { case 1: return 1; default: