digitalmars.D.learn - Weird error after moving code from Linux to Windows
- Hamburger-san (26/26) Jul 31 2015 I was expecting something to break, but I thought it'd be more
- Steven Schveighoffer (3/28) Jul 31 2015 Same version of compiler? Same compiler?
- Hamburger-san (6/10) Jul 31 2015 (just checking now on my linux)
I was expecting something to break, but I thought it'd be more along the lines of file paths... For whatever reason, my compiler really doesn't like it when I try to access my Array!SomeStruct opIndex function. It gives me the following Error Error: inout method std.container.array.Array!(SomeStruct).Array.opIndex is not callable using a mutable object struct SomeStruct { AppState!U state; int id; } Array!(SomeStruct) states_; //can allocate to this fine Array!(AppState!U) stack_; void somefunction(){ stack_.reserve(4); stack_ = make!(Array!(AppState!U)); stack_.insertBack( (states_[0].state) ); //errors } void someotherfunction(){ ... auto state = states_[aa]; //also errors ... } It compiles fine on my Linux machine and I can't figure out what I'm doing wrong here...
Jul 31 2015
On 7/31/15 11:34 AM, Hamburger-san wrote:I was expecting something to break, but I thought it'd be more along the lines of file paths... For whatever reason, my compiler really doesn't like it when I try to access my Array!SomeStruct opIndex function. It gives me the following Error Error: inout method std.container.array.Array!(SomeStruct).Array.opIndex is not callable using a mutable object struct SomeStruct { AppState!U state; int id; } Array!(SomeStruct) states_; //can allocate to this fine Array!(AppState!U) stack_; void somefunction(){ stack_.reserve(4); stack_ = make!(Array!(AppState!U)); stack_.insertBack( (states_[0].state) ); //errors } void someotherfunction(){ ... auto state = states_[aa]; //also errors ... } It compiles fine on my Linux machine and I can't figure out what I'm doing wrong here...Same version of compiler? Same compiler? -Steve
Jul 31 2015
On Friday, 31 July 2015 at 15:59:02 UTC, Steven Schveighoffer wrote:Same version of compiler? Same compiler? -SteveSame version of compiler? Same compiler? -Steve(just checking now on my linux) Yeah, same compiler: DMD2 They're both up to date and version: 2.067.1 Both machines are x64.
Jul 31 2015