www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - how do I prevent null errors when using __traits(derivedMembers


I've been poking around with "__traits", and I came across a 
whenever I run a code like this 

  I inevitably find a member that has no derived members, and 
inevitably the compiler tells me that I have an error: "Error: 
argument has no members", how do I check if a member has derived 
elements or if it has other elements contained within it?

the "members[i]" is an array of members retrieved from  
"__traits(allMembers, someModule);"

I'm trying to map all elements of an unspecified module for 
auto-completion and suggestion purposes, and I was wondering if 
there was a simpler/better ways to do that.

Thank you.
May 02 2016