Browse Source

Allow the teensy3 library to be used with strict C++11 conformance.

main
Mathias Kende 8 years ago
parent
commit
9e6e8611e4
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      teensy3/wiring.h

+ 4
- 0
teensy3/wiring.h View File

@@ -60,6 +60,10 @@ extern "C"{
#undef abs
#endif

#if __cplusplus >= 201103L && defined(__STRICT_ANSI__)
#define typeof(a) decltype(a)
#endif

#define min(a, b) ({ \
typeof(a) _a = (a); \
typeof(b) _b = (b); \

Loading…
Cancel
Save