QCompare: improve stdlib compatibility checks
Rather than using MS-STL value for Unordered as a "fallback" (not libstdc++, not libc++), check for it. This means that we now know the values for the three major stdlib implementations so we can be BC with them. This leaves us with toolchains (VxWorks, INTEGRITY) that still don't have a C++20 stdlib, so we don't know what value to pick. INTEGRITY will use libc++ for C++20, so just use a matching value. For VxWorks just pick a value. It's unlikely that it'll cause BC concerns, given it uses static linking anyhow. Finally, add an error as a fallback for any other yet unknown stdlib implementation. Change-Id: If65e84b4b644a4495943385ee631cf343db8b654 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
8a768fe7db
commit
0231f33ad1
@ -40,8 +40,17 @@ enum class Uncomparable : CompareUnderlyingType
|
|||||||
-127
|
-127
|
||||||
#elif defined(__GLIBCXX__) // libstdc++
|
#elif defined(__GLIBCXX__) // libstdc++
|
||||||
2
|
2
|
||||||
#else // assume MSSTL
|
#elif defined(_MSVC_STL_VERSION) // MS-STL
|
||||||
-128
|
-128
|
||||||
|
#elif defined(Q_CC_GHS) // INTEGRITY does not have a C++20 stdlib,
|
||||||
|
// but is going to use libc++ in the future,
|
||||||
|
// so stay compatible for now.
|
||||||
|
-127
|
||||||
|
#elif defined(Q_OS_VXWORKS) // VxWorks does not have a C++20 stdlib,
|
||||||
|
// so we wont't promise BC there.
|
||||||
|
2
|
||||||
|
#else
|
||||||
|
# error "Unsupported C++ Standard Library implementation. Please submit a bug report."
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user