Say I want to cast A* to char* and vice-versa, we have two choices (I mean, many of us think we\'ve two choices, because both seems to wor
A*
char*
A concrete example:
char a[4] = "Hi\n"; char* p = &a; f(reinterpret_cast(p)); // call f after restoring full type // ^-- any_cast<> can't do this... // e.g. given... template // <=--- can match this function void f(T (&)[N]) { std::cout << "array size " << N << '\n'; }