Re: Parameters declared as the alias of a template won't accept the arguments of the same type.

2022-05-01 Thread Mike Parker via Digitalmars-d-learn
On Monday, 2 May 2022 at 00:54:40 UTC, Elfstone wrote: Thanks. This breaks a lot of things. I don't know the reason behind the postponing, but who would expect one can't declare a parameter with an alias if it's a template?! Speaking of inconsistency. At the bottom of the DIP you can find a

Re: Parameters declared as the alias of a template won't accept the arguments of the same type.

2022-05-01 Thread Elfstone via Digitalmars-d-learn
On Sunday, 1 May 2022 at 14:14:59 UTC, Mike Parker wrote: On Sunday, 1 May 2022 at 12:39:08 UTC, Elfstone wrote: Great, I'm using the constraint, until it's fixed. Will it be fixed though? The DIP that Tejas linked is from 2020!!! The DIP was postponed. I can contact the author to see if he

Re: Help with DynamicArray of Emsi Containers

2022-05-01 Thread Christian Köstlin via Digitalmars-d-learn
On 2022-05-01 09:12, vit wrote: DynamicArray has disabled postblit (is not copyable). Package autoptr is deprecated (internaly redirected to btl:atuoptr), all functionality is moved to package [BTL](https://code.dlang.org/packages/btl) (subpackage btl:autoptr). This library contains

Re: error connecting to mongodb atlas with vibe.d

2022-05-01 Thread Arjan via Digitalmars-d-learn
On Saturday, 30 April 2022 at 14:29:56 UTC, notsteve wrote: Hi, I am trying to setup a simple webserver in D using vibe.d (0.9.4) and want to use mongoDB as a database. To achieve this, I've set up a mongoDB atlas instance with the following command inside the standard app.d file created by

Re: Parameters declared as the alias of a template won't accept the arguments of the same type.

2022-05-01 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 1 May 2022 at 12:39:08 UTC, Elfstone wrote: Great, I'm using the constraint, until it's fixed. Will it be fixed though? The DIP that Tejas linked is from 2020!!! The DIP was postponed. I can contact the author to see if he intends to pick it up again. If not, anyone interested

Re: Parameters declared as the alias of a template won't accept the arguments of the same type.

2022-05-01 Thread Elfstone via Digitalmars-d-learn
On Sunday, 1 May 2022 at 11:37:28 UTC, JG wrote: On Sunday, 1 May 2022 at 11:34:49 UTC, JG wrote: [...] The static assert isn't needed. ```d enum isVector(V) = is(V==MatrixImpl!(S,1,N),S,size_t N); @nogc auto dot1(V)(in V lhs, in V rhs) if(isVector!V) { static

Re: Parameters declared as the alias of a template won't accept the arguments of the same type.

2022-05-01 Thread JG via Digitalmars-d-learn
On Sunday, 1 May 2022 at 11:34:49 UTC, JG wrote: On Sunday, 1 May 2022 at 07:59:57 UTC, Elfstone wrote: On Sunday, 1 May 2022 at 06:42:26 UTC, Tejas wrote: [...] Thanks a lot! So this really is a D "feature". The current behaviour is so broken. It makes no sense, for a language user at

Re: Parameters declared as the alias of a template won't accept the arguments of the same type.

2022-05-01 Thread JG via Digitalmars-d-learn
On Sunday, 1 May 2022 at 07:59:57 UTC, Elfstone wrote: On Sunday, 1 May 2022 at 06:42:26 UTC, Tejas wrote: On Sunday, 1 May 2022 at 03:57:12 UTC, Elfstone wrote: module test; struct MatrixImpl(S, size_t M, size_t N) { } [...] AFAICT, I'm afraid you'll have to stick to

Re: Parameters declared as the alias of a template won't accept the arguments of the same type.

2022-05-01 Thread Elfstone via Digitalmars-d-learn
On Sunday, 1 May 2022 at 06:42:26 UTC, Tejas wrote: On Sunday, 1 May 2022 at 03:57:12 UTC, Elfstone wrote: module test; struct MatrixImpl(S, size_t M, size_t N) { } [...] AFAICT, I'm afraid you'll have to stick to `dot2`  This DIP I believe does what you want but... It

Re: Help with DynamicArray of Emsi Containers

2022-05-01 Thread vit via Digitalmars-d-learn
On Saturday, 30 April 2022 at 20:22:43 UTC, Christian Köstlin wrote: I am struggling with initializing an Emsi Containers DynamicArray in a nice way. Some background information of my usecase: I experimenting in porting some old 3d engine code of mine from c++ to dlang. In the engine I want

Re: Parameters declared as the alias of a template won't accept the arguments of the same type.

2022-05-01 Thread Tejas via Digitalmars-d-learn
On Sunday, 1 May 2022 at 03:57:12 UTC, Elfstone wrote: module test; struct MatrixImpl(S, size_t M, size_t N) { } [...] AFAICT, I'm afraid you'll have to stick to `dot2`  This DIP I believe does what you want but... It wasn't looked upon favorably...

Re: error connecting to mongodb atlas with vibe.d

2022-05-01 Thread Tejas via Digitalmars-d-learn
On Saturday, 30 April 2022 at 14:29:56 UTC, notsteve wrote: Hi, I am trying to setup a simple webserver in D using vibe.d (0.9.4) and want to use mongoDB as a database. To achieve this, I've set up a mongoDB atlas instance with the following command inside the standard app.d file created by