Skip to content

Commit 061e522

Browse files
committed
Transform F() macro into a very complicated template
1 parent 268fefd commit 061e522

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Diff for: cores/arduino/Arduino.h

+11
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,17 @@
2727
#include <avr/interrupt.h>
2828

2929
#ifdef __cplusplus
30+
31+
#undef F
32+
33+
// C++11 declaration
34+
template <typename T1>
35+
auto F(T1&& A)
36+
-> const arduino::__FlashStringHelper*
37+
{
38+
return (const arduino::__FlashStringHelper*)A;
39+
}
40+
3041
extern "C"{
3142
#endif
3243

0 commit comments

Comments
 (0)