Quantcast
Viewing all articles
Browse latest Browse all 10

Exporting the Std

So here is a piece of C++ advice.

Don’t export classes which are derived from std.

Your DLL will actually export the base class as well, and you will get crazy linker errors saying you have defined vector::operator[] twice.

What you need to do is write your subclass all in the header file, or don’t use std as base class, just keep it as a member


Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.

Viewing all articles
Browse latest Browse all 10

Trending Articles