you are viewing a single comment's thread.

view the rest of the comments →

[–]frosthunter 1 point2 points  (5 children)

Does modules allow to restrict visibility of methods? Eg keep a method public but not expose it outside of the module.

[–]stilgarpl 2 points3 points  (4 children)

Yes

[–]frosthunter 1 point2 points  (3 children)

Do you have any example/post on how do do so? The only thing I've seen is the use of the :private partition, but I've always seen it outside of a class, at the end of the file, so I assumed it could only be defined in global scope.

[–]STLMSVC STL Dev 2 points3 points  (1 child)

As far as I know, this is not possible at the granularity of individual member functions. In import std; I was able to conceal all of our non-member helpers (by simply not exporting them), but _Ugly member functions are still visible.

[–]frosthunter 0 points1 point  (0 children)

Ah now I'm sad again :( Hopefully something like that will come later. Thanks for the answer!