Re: Is this a bug ?

2016-07-11 Thread Chang Long via Digitalmars-d-learn
On Tuesday, 12 July 2016 at 04:38:42 UTC, Chang Long wrote: test.d = template newType(size_t N){ class NewType { enum Type = N ; } } just find it should be this: template newType(size_t N){ class NewType

Is this a bug ?

2016-07-11 Thread Chang Long via Digitalmars-d-learn
test.d = template newType(size_t N){ class NewType { enum Type = N ; } } class A{} alias Type = newType!1 ; N New(N)(){ return new N(); } void main(){ auto a = New!A; auto n = New!Type; }

Re: Accessing types by context

2016-06-28 Thread Chang Long via Digitalmars-d
On Wednesday, 29 June 2016 at 03:11:52 UTC, Hiemlick Hiemlicker wrote: test(myEnum.A | myEnum.B & myEnum.C). I like this: myEnum.( A | B & C) == myEnum.A | myEnum.B & myEnum.C

Re: slice based on base and width

2013-09-08 Thread Chang Long
On Sunday, 8 September 2013 at 10:53:23 UTC, Øivind wrote: a[c -: d] //D: a[c-d .. c] I think this should be a[c -: d] //D: a[c-d+1 .. c+1], e.g. a[5 -: 2] == [a[4], a[5]] try a[base][0..width]

Re: dmc 8.57 now available for download

2013-08-02 Thread Chang Long
On Friday, 2 August 2013 at 01:25:08 UTC, Walter Bright wrote: On 8/1/2013 6:22 PM, bearophile wrote: Walter Bright: Fixed. Do you mean that if I download the dmc zip again it will work? Yes, unless I screwed it up again. the package dm857c.zip show dmc file create at 2004, and when I

Re: [Win32] Remotely execute functions of a D program

2012-09-16 Thread Chang Long
It is a problem cause by snn.lib , you can edit it with a hex editor find : 83 C4 04 83 7B 1C 00 74 09 FF 73 1C FF 15 00 00 00 00 53 e8 replace to : 83 C4 04 83 7B 1C 00 74 09 FF 73 1C FF 15 00 00 00 00 eb 07 On Friday, 14 September 2012 at 17:34:37 UTC, alex wrote: Hi everyone, To keeps

Re: Add CTFE execute function

2012-07-19 Thread Chang Long
On Tuesday, 29 May 2012 at 09:46:54 UTC, Don Clugston wrote: On 28/05/12 03:40, Chang Long wrote: On Saturday, 26 May 2012 at 15:56:38 UTC, Chang Long wrote: CTFE execute will be very useful on web develop, for example It is very hard to create a CTFE version template engine with rich feature

Re: Add compile time mutable variable type

2012-06-05 Thread Chang Long
On Tuesday, 5 June 2012 at 05:39:34 UTC, Ali Çehreli wrote: On 06/04/2012 06:22 PM, Chang Long wrote: The previous two example is not correct, please see this one: Your post sounds interesting but there are lots of errors: size_t line l; -- ERROR void this(string name) { -- ERROR etc

Add compile time mutable variable type

2012-06-04 Thread Chang Long
I need a type can be change on compile time, it can be immutable or mutable at run time. For example : --- abstract class Template_parameter_Base{ TypeInto ti; string file ; size_t line l;

Re: Add compile time mutable variable type

2012-06-04 Thread Chang Long
On Tuesday, 5 June 2012 at 01:01:07 UTC, Chang Long wrote: I need a type can be change on compile time, it can be immutable or mutable at run time. For example : --- abstract class Template_parameter_Base

Re: Add compile time mutable variable type

2012-06-04 Thread Chang Long
On Tuesday, 5 June 2012 at 01:01:07 UTC, Chang Long wrote: I need a type can be change on compile time, it can be immutable or mutable at run time. For example : --- abstract class Template_parameter_Base

Re: Add CTFE execute function

2012-05-27 Thread Chang Long
On Saturday, 26 May 2012 at 15:56:38 UTC, Chang Long wrote: CTFE execute will be very useful on web develop, for example It is very hard to create a CTFE version template engine with rich feature. But we can use execute call to transe template file to d code string, then mixed

Add CTFE execute function

2012-05-26 Thread Chang Long
CTFE execute will be very useful on web develop, for example It is very hard to create a CTFE version template engine with rich feature. But we can use execute call to transe template file to d code string, then mixed it to application. The vibed project is very cool and I want to add my Jade