Details
-
User Story
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
Description
When writing C++-feature dependent API, I don't want to uglify already-ugly code like
#ifdef__cpp_char8_t Q_WEAK_OVERLOAD QString fromUtf8(const char8_t *s) { return fromUtf8(reinterpret_cast<const char*>(s)); } #endif
by having to think about what this means for QDoc and thus ending up with
#if defined(__cpp_char8_t) || defined(Q_QDOC)
QDoc just has to parse C++ feature macros as defined (bonus: even unknown ones) and to inifinity (so all version checks will be true, too).
This should also work in 5.15, because when C++20 hits the road, we'll be having a lot of these in our code.