Does the C++11/14/17 standard library have a way to cast an object to a different type but with the same cv-qualifiers as the original object? E. g.
char* ptr;
const char* cptr;
type_cast<void*>(ptr) should yield the type void*
type_cast<void*>(cptr) should yield the type const void*