Re: function core.checkedint.muls cannot inline function

2016-08-02 Thread Etranger via Digitalmars-d-learn
On Tuesday, 2 August 2016 at 18:32:42 UTC, Steven Schveighoffer wrote: On 8/2/16 2:09 PM, Etranger wrote: Hi, I'm trying to use the module core.checkedint, but I have a problem and I don't know if it is a bug or me. This simple program compiles well in debug mode with dmd, but give me an e

function core.checkedint.muls cannot inline function

2016-08-02 Thread Etranger via Digitalmars-d-learn
Hi, I'm trying to use the module core.checkedint, but I have a problem and I don't know if it is a bug or me. This simple program compiles well in debug mode with dmd, but give me an error when I compile in release mode: Error: function core.checkedint.muls cannot inline function import co

Re: Expression template

2016-07-26 Thread Etranger via Digitalmars-d-learn
On Saturday, 23 July 2016 at 23:55:44 UTC, ag0aep6g wrote: On 07/23/2016 01:05 PM, Etranger wrote: [...] To avoid the string mixin, you can let VecExpression take an alias of the mixin template (Vec_impl/VecSum_impl) and the list of arguments: [...] Thanks ! that's way much cleaner and t

Re: Expression template

2016-07-26 Thread Etranger via Digitalmars-d-learn
On Sunday, 24 July 2016 at 10:53:41 UTC, Ilya Yaroshenko wrote: On Saturday, 23 July 2016 at 11:05:57 UTC, Etranger wrote: [...] Yes, but it is more complicated in terms of multidimensional and generic abstraction. First we need to finish and test general matrix multiplication [2]. [...]

Expression template

2016-07-23 Thread Etranger via Digitalmars-d-learn
On Saturday, 23 July 2016 at 19:08:45 UTC, ketmar wrote: 2OP: sorry, i can barely read that code. this has nothing to do with your skills, it is the topic -- i've never seen clean lazy evaluation code. after all, this is a hack. still, i think that such a library worth at least some work. as

Re: Expression template

2016-07-23 Thread Etranger via Digitalmars-d-learn
On Saturday, 23 July 2016 at 12:27:39 UTC, rikki cattermole wrote: If you evaluate it as v = a + b + c instead of v = a + (b + c) you will still have a temporary value. Remember structs are just the values they carry and are basically optimized out. Either way I recommend you not worry about

Re: Expression template

2016-07-23 Thread Etranger via Digitalmars-d-learn
On Saturday, 23 July 2016 at 11:19:34 UTC, rikki cattermole wrote: On 23/07/2016 11:05 PM, Etranger wrote: [snip] * start of code ** import std.stdio; import std.traits; import std.conv; struct VecExpression(alias mixins) { mixin (mixins); VecSum!(typeof(thi

Expression template

2016-07-23 Thread Etranger via Digitalmars-d-learn
Hello all, I will greatly appreciate if you could help me with my first step in the D land. *YOU CAN SKIP DIRECTLY TO THE QUESTION BELLOW*: Please allow me to introduce myself and give you my feelings about the D language then I'll ask my question. I'm a mathematician that works mainly on c