Code:
import std.stdio;
struct Bar {
int payload;
alias payload this;
}
struct Foo {
private {
Bar m_bar;
int m_baz;
}
@property {
Bar bar() { return m_bar; }
void bar(Bar v) { m_bar = v; }
"интервал", "область"
DMD64 D Compiler v2.066.1
Why second call doesn't compile?
import std.array;
import std.algorithm;
class Foo {
bool flag;
}
void main() {
immutable(Foo)[] foos;
foreach(i; 0..5) foos ~= new Foo;
// compiles, typeof(bar1) == immutable(Foo)[]
auto bar1 = array(foos.filter!
void popFront() { foreach (ref r; rr) r.popFront(); }
I think it should be
void popFront() { foreach (ref r; rr.save) r.popFront(); }
but I think OP wanted a ready-made phobos solution, w/o all the
range boilerplate...
exactly.
I have rectangular forward range of forward ranges (not arrays):
[
[a11, a12, ... a1N],
[a21, a22, ... a2N],
...
[aM1, aM2, ... aMN]
]
I need lazy forward range:
[
a11 + a21 + ... aM1,
a12 + a22 + ... aM2,
...
a1N + a2N + ... aMN
]
Range of sum elements of every columns;
M, N - runti
This doesn't compiles
http://dpaste.dzfl.pl/bbcc31fbe016
I don't understand why this code doesn't compile:
http://dpaste.dzfl.pl/dfd8df7f80ad
101 - 107 of 107 matches
Mail list logo