views:

203

answers:

1

I know how to perform this for C++/CLI and .NET in general but, C++ doesn't have Attributes. The scenario is this:

We want to provide some methods in the binary but we don't want all of our customers to use them. If a customer needs it, we can either tell him what the signature is or, send him another non-binary file.

+2  A: 

I don't think you can control that. Since you have to publish the header files for the library, then you will expose the entire interface, even if not through intellisense.

However, you should think that there are other tools doing the same thing, used by many developers (e.g. Visual Assist).

If you need to hide some implementation details, a better solution is to apply pimpl idiom and provide in header files the interface classes, with the "public", usable methods.

The implementation classes will be included only from the cpp files containing that are compiled, and only forward declared in the public header files.

Cătălin Pitiș