Can I use a thin version of my title to include in the library?

What I mean, my real header file might look like this:

#include "some_internal_class.h"

class MyLibrary {
    Type private_member;

    void private_function();
public:

    MyLibrary();
    void function_to_be_called_by_library_users();
};

Now I want to create a dynamic library containing all the necessary definitions. and I want to send one header with it instead of sending every single header that I have in my library.

So, I thought I could create a thin version of my header like this:

class MyLibrary {
public:     
    MyLibrary();
    void function_to_be_called_by_library_users();
};

Are headlines just ads anyway? they are never passed to the compiler. And I announced that the user will use.

Is it possible? If not, why not?

+6
source share
3 answers

- ? . , .

. . , , ( MyLibrary).

, MyLibrary, . : , , .

, , , . , :

+1

. , .

[basic.def.odr]/6

[,]. , , , . ​​ D, ,

  • D ;

, ODR, . .

+7

. (ODT). MyLibrary , .

. , .

+3

All Articles