That's straightforward, there's only one type of C++ reference ... a reference to a "thing". That "thing" can be const or non-const. But once bound to the "thing", the reference variable itself can never be changed during its lifetime to bind to different "thing". So it's const by definition. So:
template <typename T>
class theClass {
public:
theClass(const T &v) : var(v) {}
private:
const T &var;
};
It's for the parameter, so it would be like void (*func)(const char*);
if the intended use is to allow for strtok() then of course don't use const.
My remark was coming from the fact that some libraries accept have functions like bool parse(char * message) {...}
and don't modify the message and when you try to call them with parse("x=42"); then on AVR it does not care too much and you get a warning that a const char * (the string literal) cannot be transformed into a char * but it still compiles whilst on the ESP32 the compiler will complain and handle the warning as a bug and fail to compile. This forces you to declare your string in a buffer which eats up RAM when it could happily have been into the flash memory.
The original question was ambiguous as to which pointer was intended not to be changed. I read it as he didn't want the function pointer's value itself to be changed.
As parsing various formats is frequent I could foresee an option to have the equivalent of sscanf() where you pass the format and the pointers to storage and have this part of the “library”
Have you considered to make STREAM_HANDLER_BUFFER_SIZE be a template argument of class StreamHandler? That would allow for more flexibility when instantiating the StreamHandler(s) to match the needs on the platform. (#define are not so great as you basically need to modify the library if you want to change the size. Also I would make all those #define typed constexpr just to give more hint to the compiler).
as they don't modify the str parameter you should consider making them const and instead of atof() which does not allow for catching errors you could use strtod()