Another use case for __traits(docComment)

Adam D. Ruppe destructionator at gmail.com
Fri Nov 8 14:00:03 UTC 2019


Writing code to wrap some Phobos functions for a script language 
and need documentation to be displayed at runtime...

Would be really nice to just say if(other_docs.length == 0) 
return __traits(docComment, item).

A UDA can populate other_docs in some functions, but when 
wrapping libraries you can't add that. Having the doc comment 
available through reflection means we can reuse these existing 
items.


More information about the Digitalmars-d mailing list