Re: open a range of files - segfault

2013-05-22 Thread bearophile
Stephan Schiffels: this code crashes with a segfault. I need help to understand what might be wrong with it. import std.array; import std.algorithm; void main() { auto names = [file1.txt, file2.txt, file3.txt]; // let these files exist auto files = names.map!(f = File(f,

Re: open a range of files - segfault

2013-05-22 Thread John Colvin
On Wednesday, 22 May 2013 at 08:38:14 UTC, Stephan Schiffels wrote: Hi, this code crashes with a segfault. I need help to understand what might be wrong with it. import std.array; import std.algorithm; void main() { auto names = [file1.txt, file2.txt, file3.txt]; // let these files

Re: open a range of files - segfault

2013-05-22 Thread John Colvin
On Wednesday, 22 May 2013 at 11:07:39 UTC, bearophile wrote: Stephan Schiffels: this code crashes with a segfault. I need help to understand what might be wrong with it. import std.array; import std.algorithm; void main() { auto names = [file1.txt, file2.txt, file3.txt]; // let these

Re: open a range of files - segfault

2013-05-22 Thread Stephan Schiffels
On Wednesday, 22 May 2013 at 11:09:49 UTC, John Colvin wrote: On Wednesday, 22 May 2013 at 11:07:39 UTC, bearophile wrote: Stephan Schiffels: this code crashes with a segfault. I need help to understand what might be wrong with it. import std.array; import std.algorithm; void main() { auto