3 ms·
That doesn't solve the problem the OP solves, which is to expose a method only to a specified set of other classes.
by gowld 7y ago
That doesn't solve the problem the OP solves, which is to expose a method only to a specified set of other classes.
- flukus 7y agoIt solves the problem by decoupling the public interface and necessary implementation details (object size), the register/unregister functions can be moved to an internal only header file, maybe even some file scoped functions. AFAIK this is not possible with a class declaration. I think you could also solve this specific problem with an internal header file in c++ too (by moving register/deregister to it's own class) but this solution solves other problems like binary compatibility.