Explorar o código

Compile without c++11.

Marek Bel %!s(int64=6) %!d(string=hai) anos
pai
achega
eb1d17c3c6
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      Firmware/Timer.h

+ 8 - 0
Firmware/Timer.h

@@ -32,12 +32,20 @@ private:
  *
  * Maximum period is at least 49 days.
  */
+#if __cplusplus>=201103L
 using LongTimer = Timer<unsigned long>;
+#else
+typedef Timer<unsigned long> LongTimer;
+#endif
 /**
  * @brief Timer unsigned short specialization
  *
  * Maximum period is at least 65 seconds.
  */
+#if __cplusplus>=201103L
 using ShortTimer = Timer<unsigned short>;
+#else
+typedef Timer<unsigned short> ShortTimer;
+#endif
 
 #endif /* TIMER_H */