On Friday, 2 May 2014 at 21:29:51 UTC, Mark Isaacson wrote:
Auto ref parameters seem to be just what I need. Thanks! I'd
still be curious if anyone has additional information regarding
the rationale at play (I'm spoiled, reading TDPL and having
each decision explained in text).
I had the
On 05/04/2014 12:58 PM, Marc Schütz schue...@gmx.net wrote:
This means that you will still get a (bit-wise) copy if you pass in an
r-value. But semantically, this is a move, not a copy, so it is
potentially cheaper than a copy (if your type has an expensive postblit).
It can be constructed
On Sunday, 4 May 2014 at 11:15:59 UTC, Timon Gehr wrote:
On 05/04/2014 12:58 PM, Marc Schütz schue...@gmx.net wrote:
This means that you will still get a (bit-wise) copy if you
pass in an
r-value. But semantically, this is a move, not a copy, so it is
potentially cheaper than a copy (if your
On Fri, 02 May 2014 08:17:06 +
Mark Isaacson via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
I'm in the process of learning/practicing D and I noticed
something that seems peculiar coming from a C++ background:
If I compile and run:
void fun(const ref int x) {
Jonathan M Davis:
Andrei suggested auto ref to fix this problem, and Walter
implemented it, but he misunderstood what Andrei had meant,
I missed this detail of the story :-)
Walter has suggested that we just redefine ref itself to do
what I just
described rather than using auto ref or
Thanks for the insights! I suppose we'll get a chance to see
where things stand at this year's dconf.
It's quite interesting that D's concept of r-values seems less
developed than C++. Here's hoping that that only results in a
better thought out solution.
On Sun, 04 May 2014 19:08:27 +
Mark Isaacson via Digitalmars-d-learn
digitalmars-d-learn@puremagic.com wrote:
Thanks for the insights! I suppose we'll get a chance to see
where things stand at this year's dconf.
It's quite interesting that D's concept of r-values seems less
developed
I'm in the process of learning/practicing D and I noticed
something that seems peculiar coming from a C++ background:
If I compile and run:
void fun(const ref int x) {
//Stuff
}
unittest {
fun(5); //Error! Does not compile
}
I get the specified error in my unit test. I understand that
On Friday, 2 May 2014 at 08:17:09 UTC, Mark Isaacson wrote:
I'm in the process of learning/practicing D and I noticed
something that seems peculiar coming from a C++ background:
If I compile and run:
void fun(const ref int x) {
//Stuff
}
unittest {
fun(5); //Error! Does not compile
}
I
Auto ref parameters seem to be just what I need. Thanks! I'd
still be curious if anyone has additional information regarding
the rationale at play (I'm spoiled, reading TDPL and having each
decision explained in text).
On Friday, 2 May 2014 at 21:29:51 UTC, Mark Isaacson wrote:
Auto ref parameters seem to be just what I need. Thanks! I'd
still be curious if anyone has additional information regarding
the rationale at play (I'm spoiled, reading TDPL and having
each decision explained in text).
The C++ way
11 matches
Mail list logo