If you are not considering why we posted our concerns, how about asking for a proof why it is safe. C/C++ is built upon a set of rules; if it is allowed, the standard will state it.
Up until your post everything seemed to be a battle of opinions. You were the first to quote rules and I thank you for it. Where possible I shall avoid void pointers.
Code:
#include <Arduino.h>
template void sendAnything (const T& value)
{
const byte* p = (const byte*) &value;
for (unsigned int i = 0; i < sizeof value; i++)
Serial.write (*p++);
} // end of sendAnything
Thanks for this, Nick Gammon, I shall implement this on the morrow.
So one last question: Overloading or Templating?