+/* avr-gcc does not seem to support libstdc++ */
+#if defined(__cplusplus) && !CPU_AVR
+ /* Type-generic macros implemented with template functions. */
+ #include <algorithm>
+
+ template<class T> inline T ABS(T n) { return n >= 0 ? n : -n; }
+ #define MIN(a,b) std::min(a, b)
+ #define MAX(a,b) std::max(a, b)
+ #define SWAP(a,b) std::swap(a, b)
+#elif (COMPILER_STATEMENT_EXPRESSIONS && COMPILER_TYPEOF)
+ /* Type-generic macros implemented with statement expressions. */