We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b2d90c2 + 2de5333 commit b67d877Copy full SHA for b67d877
DallasTemperature.h
@@ -38,8 +38,26 @@
38
#define DEVICE_DISCONNECTED_RAW -7040
39
40
// For readPowerSupply on oneWire bus
41
-#ifndef nullptr
42
-#define nullptr NULL
+// definition of nullptr for C++ < 11, using official workaround:
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf
43
+#if __cplusplus < 201103L
44
+const class
45
+{
46
+public:
47
+ template <class T>
48
+ operator T *() const
49
+ {
50
+ return 0;
51
+ }
52
+ template <class C, class T>
53
+ operator T C::*() const
54
55
56
57
+
58
+private:
59
+ void operator&() const;
60
+} nullptr = {};
61
#endif
62
63
typedef uint8_t DeviceAddress[8];
0 commit comments