See title.
I have:
class Foo {
private:
Foo();
public:
static Foo* create();
}
What need I do from here to make Fo
In C++11, you can explicitly disable the creation of default copy and assignment constructor by placing = delete after the declaration.
From Wikipedia:
struct NonCopyable {
NonCopyable() = default;
NonCopyable(const NonCopyable&) = delete;
NonCopyable & operator=(const NonCopyable&) = delete;
};
The same goes for classes of course.