On Sunday, September 9, 2018 8:30:12 AM MDT Saurabh Das via Digitalmars-d-
learn wrote:
> Thank you for explaining all this.
>
> It is frustrating because the behaviour is very counterintuitive.
>
> I will use a workaround for now.
Ranges are fantastic, and the basic concept is solid, but a
Thank you for explaining all this.
It is frustrating because the behaviour is very counterintuitive.
I will use a workaround for now.
Saurabh
/18 12:55 PM, Jonathan M Davis wrote:
> >>> It's not a bug in writeln. Any time that a range is copied, you must
> >>> not
> >>> do _anything_ else with the original unless copying it is equivalent
> >>> to
> >>> calling save on it,
On 9/6/18 2:52 PM, Jonathan M Davis wrote:
On Thursday, September 6, 2018 12:21:24 PM MDT Steven Schveighoffer via
Digitalmars-d-learn wrote:
On 9/6/18 12:55 PM, Jonathan M Davis wrote:
It's not a bug in writeln. Any time that a range is copied, you must not
do _anything_ else
On Thursday, September 6, 2018 12:21:24 PM MDT Steven Schveighoffer via
Digitalmars-d-learn wrote:
> On 9/6/18 12:55 PM, Jonathan M Davis wrote:
> > On Thursday, September 6, 2018 2:40:08 AM MDT Saurabh Das via
> > Digitalmars-d->
> > learn wrote:
> >> Is this a
On 9/6/18 12:55 PM, Jonathan M Davis wrote:
On Thursday, September 6, 2018 2:40:08 AM MDT Saurabh Das via Digitalmars-d-
learn wrote:
Is this a bug with writeln?
void main()
{
import std.stdio, std.range, std.algorithm;
auto a1 = sort([1,3,5,4,2]);
auto a2 = sort([9,8,9
On Thursday, September 6, 2018 2:40:08 AM MDT Saurabh Das via Digitalmars-d-
learn wrote:
> Is this a bug with writeln?
>
> void main()
> {
> import std.stdio, std.range, std.algorithm;
>
> auto a1 = sort([1,3,5,4,2]);
> auto a2 = sort([9,8,9]);
>
On Thursday, 6 September 2018 at 09:06:21 UTC, Simen Kjærås wrote:
On Thursday, 6 September 2018 at 08:40:08 UTC, Saurabh Das
wrote:
Is this a bug with writeln?
Yup. What happens is writeln destructively iterates over b[i].
Since b[i] is a forward range, this shouldn't be done
destructively
On Thursday, 6 September 2018 at 08:40:08 UTC, Saurabh Das wrote:
Is this a bug with writeln?
Yup. What happens is writeln destructively iterates over b[i].
Since b[i] is a forward range, this shouldn't be done
destructively. Instead, a copy should be made using b[i].save,
somewhere deep
Is this a bug with writeln?
void main()
{
import std.stdio, std.range, std.algorithm;
auto a1 = sort([1,3,5,4,2]);
auto a2 = sort([9,8,9]);
auto a3 = sort([5,4,5,4]);
pragma(msg, typeof(a1));
pragma(msg, typeof(a2));
pragma(msg, typeof(a3));
auto b = [a1, a2
On Friday, 16 February 2018 at 13:57:07 UTC, Steven Schveighoffer
wrote:
You have a pretty good minimal test, put that in bugzilla along
with the forum thread link and all the info we know. Mark it as
a dmd bug, regression, along with the version where it
regressed (2.076.1), and I would tag
On 2/16/18 8:51 AM, arturg wrote:
On Friday, 16 February 2018 at 13:28:59 UTC, Steven Schveighoffer wrote:
Strictly speaking, this is not necessarily proof that it's in phobos,
there could have been changes elsewhere that cause one of the
conditions to fail.
However, testing this out, I
On Friday, 16 February 2018 at 13:28:59 UTC, Steven Schveighoffer
wrote:
Strictly speaking, this is not necessarily proof that it's in
phobos, there could have been changes elsewhere that cause one
of the conditions to fail.
However, testing this out, I found something very weird.
If you
On 2/16/18 8:16 AM, bauss wrote:
On Friday, 16 February 2018 at 13:08:09 UTC, bauss wrote:
On Friday, 16 February 2018 at 12:15:07 UTC, arturg wrote:
On Friday, 16 February 2018 at 11:45:21 UTC, arturg wrote:
this code fails to compile:
void delegate(void*) dg;
void delegate(void*)[]
On Friday, 16 February 2018 at 13:08:09 UTC, bauss wrote:
On Friday, 16 February 2018 at 12:15:07 UTC, arturg wrote:
On Friday, 16 February 2018 at 11:45:21 UTC, arturg wrote:
this code fails to compile:
void delegate(void*) dg;
void delegate(void*)[] dgs = [dg, dg, dg];
On Friday, 16 February 2018 at 12:15:07 UTC, arturg wrote:
On Friday, 16 February 2018 at 11:45:21 UTC, arturg wrote:
this code fails to compile:
void delegate(void*) dg;
void delegate(void*)[] dgs = [dg, dg, dg];
dgs.writeln;
dgs.remove(1).writeln();
if you comment out
On Friday, 16 February 2018 at 11:45:21 UTC, arturg wrote:
this code fails to compile:
void delegate(void*) dg;
void delegate(void*)[] dgs = [dg, dg, dg];
dgs.writeln;
dgs.remove(1).writeln();
if you comment out dgs.writeln; it works as expected,
it works if you use other types
this code fails to compile:
void delegate(void*) dg;
void delegate(void*)[] dgs = [dg, dg, dg];
dgs.writeln;
dgs.remove(1).writeln();
if you comment out dgs.writeln; it works as expected,
it works if you use other types then void*:
void delegate(int*) dg;
void
18 matches
Mail list logo