On 2017-02-22 12:18, Martin Tschierschke wrote:

Exactly what I was looking for, **thank you!**
Both ways of accessing the struct elements are very interesting,
giving an impression what is possible with D.


Is it possible to overwrite "toString" for all structs in one step?

It depends. You can create a template mixin containing the implementation of toString, which need to be mixed in in all structs. Or you can create a new function that can convert any passed in structs in a generic way. It depends on what you need the string for.

--
/Jacob Carlborg

Reply via email to