Question: Many websites on unit testing say to extract an interface and code to the interface (which makes sense), but that requires using polymorphism via pointers. Is it possible to accomplish this without pointers so I don't have to modify the production code? I would rather not use pointers and manage memory.

* Conditional compilation is allowed.
* I am specifically using gmock for my stubs/mocks.

Some things that I've researched are:

* Using references
	+ involves writing special copy constructors or making it non-copyable
	+ still have to manage memory with new/delete
	+ not sure if this will cause unforseen problems down the line
* Creating via code-generation a collection of pointer-wrapper classes. The interface stays the same with a few added methods for testing.
	+ seems like it would work but require upkeep
	+ example of what I mean down below

**Please note that gmock mock objects are not copyable**, therefore I cannot constructor inject them. (<https://groups.google.com/forum/#!topic/googlemock/GD73UXjQowE/discussion>)

Problem Example
===============

```
class Example
{
public:
   Example();
   ~Example();

private:
   // I want to stub out _foo.
   Dependency _foo;
};

```

Pointer Wrapper Class Example
=============================

```
#ifndef UNIT_TEST
   Foo _foo;
#else
   PtrWrapFoo _foo;
#endif

```

**...**

```
_foo.setImpl(StubFoo *aStubFoo);

```

**...**

```
void PtrWrapFoo::doSomething()
{
   _impl->doSomething();
}

```

Answer: 
Modulus operator divides it by zero and next finds the remainder, thus you will get divide by zero error
x must not be equal to 0 otherwise division by zero.

Just think how many zeroes in 13195?