When I export a class that contains an STL object, a unique_ptr, my compiler generates the C4251 warning, telling me that I have to fully specify the unique_ptr.
class IMPORT_EXPORT_API Factory
{
std::unique_ptr<ClassA> impl{ nullptr };
public:
std::unique_ptr<ClassB> create();
}
However, when I export just a method that also returns an STL object, but not the entire class, I don't get the error.
class Factory
{
std::unique_ptr<ClassA> impl{ nullptr };
public:
IMPORT_EXPORT_API std::unique_ptr<ClassB> create();
}
Why is this so?