Doctor J wrote:
Answered my own question:
static if (is(typeof(func0) == function))
writefln(func0 is a function.);
is() really wants a type, not an expression.
You say you want to test whether a struct/class member is a field or a
property. Pointers to class and struct methods
Georg Wrede wrote:
When creating templates, it is sometimes handy to print the type of
something. Is there a trivial way to print it?
writeln(Typeof T is: , typeof(t));
This doesn't work, but you get the idea.
typeof(t).stringof
-Lars
Chris Nicholson-Sauls wrote:
Lars Kyllingstad wrote:
Daniel Keep wrote:
Lars Kyllingstad wrote:
[snip]
From a performance
perspective, however, it carries with it the overhead of an extra
function call, which I'm not sure I want.
-Lars
You're worried about a second function call which
Jarrett Billingsley wrote:
On Mon, Feb 2, 2009 at 8:31 AM, Lars Kyllingstad
pub...@kyllingen.nospamnet wrote:
I have some functions for which I want to find the nicest possible
combination of performance and usability. I have two suggestions as to how
they should be defined.
Classic style
Daniel Keep wrote:
Lars Kyllingstad wrote:
[snip]
From a performance
perspective, however, it carries with it the overhead of an extra
function call, which I'm not sure I want.
-Lars
You're worried about a second function call which could potentially be
inlined, yet you're seemingly
Lars Kyllingstad wrote:
real anotherReturnValue;
Correction:
real aReturnValue;
Steven Schveighoffer wrote:
Jerry Quinn wrote
Hi. I'm trying to port a C++ program to D as an exercise in exploring D.
As I'm doing this, I've run into a bit of confusion with the const system.
I have something like
class A {}
class B {
const A a;
void init(A aa) { a = aa; }
}
This