On Fri, Nov 7, 2008 at 11:38 PM, Tim M <[EMAIL PROTECTED]> wrote:
> I tried 1.036 and had the same problem. I'm using the offsetof and sizeof in
> a few constants which I've defined at the beginning of the file so I tried
> moving to the end of the file and it is no longer in error. I read somewher
I tried 1.036 and had the same problem. I'm using the offsetof and sizeof
in a few constants which I've defined at the beginning of the file so I
tried moving to the end of the file and it is no longer in error. I read
somewhere that you don't have to forward declare everything in D like you
I am having a problem trying to enumerate then call a method of a class.
I have the following situation
class Foo
{
void bar () { writefln( "hello" ); }
}
void traitsTest( TClass, string name )( TClass foo )
{
foreach( method; __traits( allMembers, TClass ) )
{
writefln( method );
On Fri, Nov 7, 2008 at 8:59 PM, Tim M <[EMAIL PROTECTED]> wrote:
> Did you find a sollution? I need to get the offset of a member of a struct
> so I can port a .h to a .di but dmd complains that the member doesn't exist
> on the struct. I dont think anyone has ever tried the code at:
> http://www.d
Did you find a sollution? I need to get the offset of a member of a struct
so I can port a .h to a .di but dmd complains that the member doesn't
exist on the struct. I dont think anyone has ever tried the code at:
http://www.digitalmars.com/d/1.0/ctod.html#fieldoffset
On Fri, 22 Aug 2008 10
Oh, sorry, I did not express myself correctly.
What I actually meant was, I need to enumerate all "foo"'s overloads, but "foo"
is not class methods, its a set of standalone functions.
I need to do that in order to properly bind those overloads automatically to a
scripting language. My final goa
Daniel Ribeiro Maciel wrote:
I'm having a problem to pass function overload pointers. I have the following
situation:
void foo() { writefln( "hello" ); }
void foo(int i) { writefln( "hello 1 int ", i ); }
void foo(int i, int j) { writefln( "hello 2 int ", i, " ", j ); }
I need to be able to bu
Jarrett Billingsley Wrote:
> You.. can't actually allocate a static array on the heap using new.
> At least not directly. It's kind of an embarrassing hole in the
> syntax. In fact, I'm not sure if you can even get a static array to
> point onto the heap, since a static array "reference" is trea
Jarrett Billingsley Wrote:
> Long story short - why use D if you aren't going to be able to take
> advantage of the very things that make it cool?
Not only GC makes it cool. D has a number of other features.