|
16 | 16 | #include <iterator>
|
17 | 17 | #include <iostream>
|
18 | 18 | #include <iomanip>
|
19 |
| -#if __cplusplus >= 201103L |
| 19 | +#if defined(__clang__) && defined(_MSC_VER) |
20 | 20 | #include <type_traits>
|
21 | 21 | #endif
|
22 | 22 |
|
@@ -127,7 +127,7 @@ typedef std::tr1::shared_ptr<PVUnionArrayPtrArray> PVUnionArrayPtrArrayPtr;
|
127 | 127 | class PVDataCreate;
|
128 | 128 | typedef std::tr1::shared_ptr<PVDataCreate> PVDataCreatePtr;
|
129 | 129 |
|
130 |
| -#if __cplusplus >= 201103L |
| 130 | +#if defined(__clang__) && defined(_MSC_VER) |
131 | 131 | template <typename T>
|
132 | 132 | constexpr ScalarType typeToCode() {
|
133 | 133 | if (std::is_same<T, boolean>::value)
|
@@ -416,10 +416,10 @@ class epicsShareClass PVScalarValue : public PVScalar {
|
416 | 416 | typedef T* pointer;
|
417 | 417 | typedef const T* const_pointer;
|
418 | 418 |
|
419 |
| - #if __cplusplus < 201103L |
420 |
| - static const ScalarType typeCode; |
421 |
| - #else |
| 419 | + #if defined(__clang__) && defined(_MSC_VER) |
422 | 420 | constexpr static const ScalarType typeCode = typeToCode<T>();
|
| 421 | + #else |
| 422 | + static const ScalarType typeCode; |
423 | 423 | #endif
|
424 | 424 |
|
425 | 425 | /**
|
@@ -1221,10 +1221,10 @@ class epicsShareClass PVValueArray : public detail::PVVectorStorage<T,PVScalarAr
|
1221 | 1221 | typedef ::epics::pvData::shared_vector<T> svector;
|
1222 | 1222 | typedef ::epics::pvData::shared_vector<const T> const_svector;
|
1223 | 1223 |
|
1224 |
| - #if __cplusplus < 201103L |
1225 |
| - static const ScalarType typeCode; |
1226 |
| - #else |
| 1224 | + #if defined(__clang__) && defined(_MSC_VER) |
1227 | 1225 | constexpr static const ScalarType typeCode = typeToCode<T>();
|
| 1226 | + #else |
| 1227 | + static const ScalarType typeCode; |
1228 | 1228 | #endif
|
1229 | 1229 |
|
1230 | 1230 | /**
|
|
0 commit comments