3 ms·
If all you're doing is accessing public members, sure.
by jayd16 1y ago
If all you're doing is accessing public members, sure.
- WalterBright 1y agoIt works for all functions that have parameters, `f(a)` and `a.f()` are equivalent.
- jayd16 1y agoYes, but I presume that f() cannot access private members of a.
- WalterBright 1y agoThat's correct.
- nicwilson 1y ago`private` is only private to the module, not the struct/class, (In other words, all functions in the same module are all C++ style `friend`s) and so free function in same module work.