const void is the type with which you can create a pointer. It looks like a regular void pointer, but conversions work differently. For example, a const int* cannot be implicitly converted to void* , but it can be implicitly converted to const void* . Similarly, if you have const void* , you cannot static_cast it to int* , but you can static_cast it to const int* .
const int i = 10; void* vp = &i;
Benjamin Lindley Jun 17 '16 at 12:16 2016-06-17 12:16
source share