Two way struct wrapper

drug drug2004 at bk.ru
Wed Oct 11 12:35:51 UTC 2017


Using `alias this` it's easy to make wrapper for structure that calls 
wrapped structure methods like its own. This is one way - from wrapper 
to wrapped transformation. Is it possible to create the opposite way 
from wrapped to wrapper?

https://run.dlang.io/is/Avyu3I

All calls to Bar is redirected to Foo, but output of Foo is not 
redirected to Bar.


More information about the Digitalmars-d-learn mailing list