Re: How can convert the folowing to D.

2016-04-01 Thread ZombineDev via Digitalmars-d-learn
On Friday, 1 April 2016 at 00:34:49 UTC, learner wrote: Hi, I have the following code in C++. rectangles.erase(rectangles.begin() + index); where rectangles is: std::vector rectangles; how can I do something similar in D. Learner. Also, if you are using std.container.array (which similar

No aa.byKey.length?

2016-04-01 Thread Yuxuan Shui via Digitalmars-d-learn
Why? This is annoying when I need to feed it into a function that requires hasLength.

Re: No aa.byKey.length?

2016-04-01 Thread Ali Çehreli via Digitalmars-d-learn
On 04/01/2016 01:50 PM, Yuxuan Shui wrote: Why? This is annoying when I need to feed it into a function that requires hasLength. Sounds easy to implement. Please file an enhancement request: https://issues.dlang.org/ Ali

Re: Solution to "statement is not reachable" depending on template variables?

2016-04-01 Thread ZombineDev via Digitalmars-d-learn
On Friday, 1 April 2016 at 01:21:32 UTC, Walter Bright wrote: On 3/16/2016 4:18 AM, Johan Engelen wrote: I've found discussions, but not an actual "recommended" solution for the problem of "statement is not reachable" warnings in templates with early returns, e.g.: ``` bool nobool(T...)()

Re: Solution to "statement is not reachable" depending on template variables?

2016-04-01 Thread Johan Engelen via Digitalmars-d-learn
On Friday, 1 April 2016 at 01:21:32 UTC, Walter Bright wrote: On 3/16/2016 4:18 AM, Johan Engelen wrote: I've found discussions, but not an actual "recommended" solution for the problem of "statement is not reachable" warnings in templates with early returns, e.g.: ``` bool nobool(T...)()

Re: How can convert the folowing to D.

2016-04-01 Thread learner via Digitalmars-d-learn
On Friday, 1 April 2016 at 01:09:32 UTC, Ali Çehreli wrote: On 03/31/2016 05:34 PM, learner wrote: Hi, I have the following code in C++. rectangles.erase(rectangles.begin() + index); where rectangles is: std::vector rectangles; how can I do something similar in D. Learner. import