On Saturday, 8 November 2014 at 18:28:50 UTC, fra wrote:
On Saturday, 8 November 2014 at 10:19:19 UTC, John Colvin wrote:
On Saturday, 8 November 2014 at 10:03:51 UTC, Jason den Dulk wrote:
When upgrading my compiler from 2.065 to 2.066.1 I have encountered problems with some of my extern(C) code.

My declarations (in a .di file) are wrapped in an extern(C) declaration. The code compiled fine in 2.065. In 2.066.1 it first complained about functions returning "const char *" ("function without this cannot be const").

const char* foo() {}

is a function that takes a const 'this' reference and returns char*
You want
const(char)* foo() {}
or
const(char*) foo() {}

Oh look, is THIS AGAIN. :(

Yeah, this is causing a lot of confusion.

Reply via email to