On Tuesday, 8 July 2014 at 11:16:52 UTC, Marc Schütz wrote:
Your example above doesn't work, because it would be
interpreted as a redefinition of the struct. Instead, you can
use a public alias to a private type:
// my_module.d:
private struct MyStructImpl {
int x;
}
public alias MyStructPtr = MyStructImpl*;
void doSomething(MyStructPtr foo) {
...
}
// my_main_program.d:
MyStructPtr bar; // OK
MyStructImpl foo; // Error: my_module.MyStructImpl is private
Thanks, that is what I was looking for.
