For code like this:
#include <cstdint>
extern const char *f();
extern void g(const uint8_t *);
int main()
{
const char *p = f();
g(reinterpret_cast<const uint8_t *>(p));
}
clang-tidy -checks='cppcoreguidelines-*' generates warning:
do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast]
and indeed there is such paragraph in CppCoreGuidelines.
But how it is possible to avoid reinterpret_cast or C-style cast for case like const char * -> const uint8_t *?
Is this bug in CppCoreGuidelines ?