Re: My template tuple code does not compile

2019-03-01 Thread Simen Kjærås via Digitalmars-d-learn
On Wednesday, 27 February 2019 at 22:45:03 UTC, Victor Porton wrote: I rewrote it again: https://github.com/vporton/struct-params-dlang/blob/f50f7e5919f90b1d06bf0cc08e3055548aad1797/source/struct_params.d But it does not work :-( What is my error? source/struct_params.d(43,60): Error: function

Re: My template tuple code does not compile

2019-02-27 Thread Victor Porton via Digitalmars-d-learn
I rewrote it again: https://github.com/vporton/struct-params-dlang/blob/f50f7e5919f90b1d06bf0cc08e3055548aad1797/source/struct_params.d But it does not work :-( What is my error? source/struct_params.d(43,60): Error: function expected before `()`, not `()` of type `()` source/struct_params.d(4

Re: My template tuple code does not compile

2019-02-27 Thread Q. Schroll via Digitalmars-d-learn
On Wednesday, 27 February 2019 at 03:53:35 UTC, Victor Porton wrote: After following your suggestion to rewrite it with Stride it does not work either. I assume the error is somehow related to allSatisfy!. https://github.com/vporton/struct-params-dlang/blob/c1adc86672f46fd6b743903cc270dceef120

Re: My template tuple code does not compile

2019-02-27 Thread Simen Kjærås via Digitalmars-d-learn
On Wednesday, 27 February 2019 at 03:53:35 UTC, Victor Porton wrote: After following your suggestion to rewrite it with Stride it does not work either. I assume the error is somehow related to allSatisfy!. https://github.com/vporton/struct-params-dlang/blob/c1adc86672f46fd6b743903cc270dceef120

Re: My template tuple code does not compile

2019-02-26 Thread Victor Porton via Digitalmars-d-learn
After following your suggestion to rewrite it with Stride it does not work either. I assume the error is somehow related to allSatisfy!. https://github.com/vporton/struct-params-dlang/blob/c1adc86672f46fd6b743903cc270dceef120a8fe/source/struct_params.d Please help. It is important for both D c

Re: My template tuple code does not compile

2019-02-26 Thread Q. Schroll via Digitalmars-d-learn
On Tuesday, 26 February 2019 at 22:56:37 UTC, Victor Porton wrote: On Tuesday, 26 February 2019 at 22:51:15 UTC, Q. Schroll wrote: Grouping arguments could be done, but from my experience, it does not buy you anything; rather it makes it worse. Better just deal with heterogeneous stuff just lik

Re: My template tuple code does not compile

2019-02-26 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Feb 26, 2019 at 10:56:37PM +, Victor Porton via Digitalmars-d-learn wrote: [...] > After fixing the error you pointed me, it does not work too: > > mixin ProviderParams!("S", ((int, "x"), (float, "y"))); Try this: mixin ProviderParams!("S", int, "x", float, "y"); > Also: C

Re: My template tuple code does not compile

2019-02-26 Thread Victor Porton via Digitalmars-d-learn
On Tuesday, 26 February 2019 at 22:51:15 UTC, Q. Schroll wrote: On Tuesday, 26 February 2019 at 21:43:31 UTC, Victor Porton wrote: Compilation of unittest at the bottom of this file fails with an error. What is my error? ... You have the line ProviderParams("S", ((int, "x"), (float, "y")))

Re: My template tuple code does not compile

2019-02-26 Thread Q. Schroll via Digitalmars-d-learn
On Tuesday, 26 February 2019 at 21:43:31 UTC, Victor Porton wrote: Compilation of unittest at the bottom of this file fails with an error. What is my error? I cannot tell you, why exactly you get these error messages. I can explain you the probable cause of the errors. I have not tested anyth