I have a Visual Studio project that contains files with managed code and files with unmanaged code. The project has the CLR support, but when I add a file where I do not nee
There is the possibility to use the workaround known as the Pointer To Implementation (pImpl) idiom.
Following is a brief example:
// Foo.h
#include <memory>
class Foo
{
public:
Foo();
// forward declaration to a nested type
struct Mstr;
std::unique_ptr<Mstr> impl;
};
// Foo.cpp
#include <mutex>
struct Foo::Mstr
{
std::mutex m;
};
Foo::Foo()
: impl(new Mstr())
{
}