drawbacks of a void pointer in C++

c++, pointers, void

Solution

The biggest drawback is that making use of void pointers stops the compiler from being able to enforce type checking. Especially in a language that supports object oriented principles, I think it would be strange to be making heavy use of void pointers.

You are more likely to find void pointers in C to mimic some polymorphic behavior, but the same type-safety concerns exist.

Problem

A far as I know, a void pointer in C++ `void*` can point to anything. This might be quite useful (for me) if I want to develop a solution without using some sort of inheritance. But the question I want to know is whether there is any performance drawbacks in this approach?

Original source