Question: In our company's coding standard, we have been told to "be aware of the ways (accidental) copying can be prevented".

I am not really sure what this means, but assume that they mean we should stop classes from being copied if this is not required.

What I can think of is as follows:

1. Make the copy constructor of a class private.
2. Make the assignment operator (operator=) of a class private.
3. Make the constructor of a class explicit (to stop classes from being created using incorrect variables).
4. For all classes that carry out memory allocation and where copying is required, make sure that the copy constructor and assignment operator carry out deep copying rather than shallow copying.

Am I on the right track? Is there anything I might have missed out?

Answer: 
If you are using boost, then the easiest way to prevent a class from being copied is by deriving your class from [noncopyable](http://www.boost.org/doc/libs/1_39_0/libs/utility/utility.htm):

```
#include <boost/noncopyable.hpp>

class Foo : private boost::noncopyable
{
}

```

It makes your intention clearer than manually making the copy constructor and assigment operator private, and it has the same result.
You are on the right track. If you do not want to use boost you can do the following: Make copy constructor and copy assignment operator private and do not implement them. Thus you will get a compiler error if you try to copy an instance.