Oh, it doesn't work when accessing member data. Sorry for the
noise.
You don't need to use dereference operator. Example:
http://dpaste.dzfl.pl/d34c23e5
import std.stdio;
struct Foo {
void answer() {
writeln("As you wish!");
}
}
void main() {
Foo veryVeryLongNamedStruct;
auto v = &veryVeryLongNamedStruct;
v.answer();
}
On Saturday, 29 June 2013 at 06:08:28 UTC, Jeremy DeHaan wrote:
I've been toying around with the idea of working on an IDE,
mostly because I think it would be an interesting/fun project
to work on. In any case, the only thing I cannot seem to wrap
my head around is how programs like Code Blocks
On Saturday, 25 May 2013 at 18:28:09 UTC, Diggory wrote:
I think you can do it using a string mixin instead:
enum Test = `writeln("Hello D People!")`
void main() {
mixin(Test);
}
The answer to your question is probably that D has to know the
context for a template mixing at the point wher
Is there a reason for restricting mixin templates to only include
declarations?
For example, the following code doesn't work.
(http://dpaste.dzfl.pl/1582a25e)
Looking at the language specification
(http://dlang.org/template-mixin.html) this doesn't seem to be an
implementation limitation.
im