__FlashStringHelper class source code?

Hello.

Where can I find the source code for the __FlashStringHelper class?
I've searched Arduino's IDE internals and source codes on GitHub, but to no avail.

Thanks!

I found this:

class __FlashStringHelper;
#define F(string_literal) (reinterpret_cast<const __FlashStringHelper *>(PSTR(string_literal)))

ultr:
Where can I find the source code for the __FlashStringHelper class?

There is none (beyond the declaration above). It’s a fictitious class meant to force the compiler’s hand.

Originally I believe it was a struct. I suspect Mr. Hart changed it to a class because classes are cooler. :slight_smile: The point is, the actual type is irrelevant. What is important is that the type is unique and that a pointer to the whatever is used.