allMembers

Manu turkeyman at gmail.com
Fri May 4 07:11:06 PDT 2012


On 4 May 2012 17:09, H. S. Teoh <hsteoh at quickfur.ath.cx> wrote:

> On Fri, May 04, 2012 at 05:03:36PM +0300, Manu wrote:
> > On 4 May 2012 17:01, Manu <turkeyman at gmail.com> wrote:
> >
> > > On 4 May 2012 16:34, Adam D. Ruppe <destructionator at gmail.com> wrote:
> > >
> > >> __traits(getMember, test.module, m);
> > >>
> > >> should work.
> > >>
> > >
> > > Tried that:
> > >
> > > static if( is( __traits( getMember, mixin( moduleName ), m ) ==
> interface
> > > ) )
> > > {
> > >   pragma( msg, "Is an interface: " ~ m );
> > > }
> > >
> >
> > ** accidental 'send' ** >_<
> >
> > Fails:
> >   engine\bindings.d(399):basic type expected, not __traits
> >   engine\bindings.d(399):found '__traits' when expecting ')'
> >   engine\bindings.d(399):expression expected, not 'interface'
> >   engine\bindings.d(399):found ')' instead of statement
>
> You're missing a typeof there. __traits(getMember,...) returns the
> actual value of the member, not just its type.
>

Sorry, I meant to say above: I'm looking for _definitions_ (not
declarations), and not variables.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20120504/0db2ac58/attachment.html>


More information about the Digitalmars-d mailing list