C style 'static' functions
John Burton via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Jul 19 02:38:15 PDT 2017
On Wednesday, 19 July 2017 at 07:51:11 UTC, Gary Willoughby wrote:
> On Wednesday, 19 July 2017 at 07:22:48 UTC, John Burton wrote:
>> In C++ I could use static or an anonymous namespace for
>> implementation functions, but there doesn't seem to be
>> anything similar in D.
>> Is there any way to achieve what I want in D (Private
>> implementation functions)
>
> Try the package keyword:
> https://dlang.org/spec/attribute.html#visibility_attributes
This appears to still have the same issue. I can't use the
"package" function in the main program but it still conflicts
with the one I can use from a different module. Unless I'm doing
it wrong...
More information about the Digitalmars-d-learn
mailing list