Ignoring how repulsive and hacky it is, is the following guaranteed to be safe? If not, why?
//.h
struct foo
{
const static intptr_t KEY = (intptr_t) "VALUE";
};
//.cpp
void useFoo()
{
const char * value = (const char *) foo::KEY;
printf("%s",value);
}