1212 #error "RTTI compiler option is disabled but required by the DelegateMQ library."
1313#endif
1414
15- #if defined(DMQ_THREAD_STDLIB) || defined(DMQ_THREAD_WIN32)
16- // Windows / Linux / macOS (Standard Library)
17- #include < condition_variable>
15+ #if defined(DMQ_THREAD_STDLIB) || defined(DMQ_THREAD_WIN32) || defined(DMQ_THREAD_QT)
16+ // Windows / Linux / macOS / Qt (Standard Library)
17+ #include < condition_variable>
1818#elif defined(DMQ_THREAD_FREERTOS)
1919 #include " predef/util/FreeRTOSClock.h"
2020 #include " predef/util/FreeRTOSMutex.h"
@@ -38,7 +38,7 @@ namespace dmq
3838 // @TODO: Change aliases to switch clock type globally if necessary
3939
4040 // --- CLOCK SELECTION ---
41- #if defined(DMQ_THREAD_STDLIB) || defined(DMQ_THREAD_WIN32)
41+ #if defined(DMQ_THREAD_STDLIB) || defined(DMQ_THREAD_WIN32) || defined(DMQ_THREAD_QT)
4242 // Windows / Linux / macOS / Qt
4343 using Clock = std::chrono::steady_clock;
4444
@@ -68,7 +68,7 @@ namespace dmq
6868 using TimePoint = typename Clock::time_point;
6969
7070 // --- MUTEX / LOCK SELECTION ---
71- #if defined(DMQ_THREAD_STDLIB) || defined(DMQ_THREAD_WIN32)
71+ #if defined(DMQ_THREAD_STDLIB) || defined(DMQ_THREAD_WIN32) || defined(DMQ_THREAD_QT)
7272 // Windows / Linux / macOS / Qt
7373 using Mutex = std::mutex;
7474 using RecursiveMutex = std::recursive_mutex;
@@ -143,6 +143,8 @@ namespace dmq
143143 #include < string>
144144 #include < list>
145145 #include < sstream>
146+ #include < memory>
147+ #include < utility>
146148
147149 // Not using xallocator; define as nothing
148150 #undef XALLOCATOR
@@ -161,6 +163,13 @@ namespace dmq
161163
162164 typedef std::string xstring;
163165 typedef std::wstring xwstring;
166+
167+ // Fallback xmake_shared — uses std::make_shared when fixed-block allocator is disabled
168+ template <typename T, typename ... Args>
169+ inline std::shared_ptr<T> xmake_shared (Args&&... args)
170+ {
171+ return std::make_shared<T>(std::forward<Args>(args)...);
172+ }
164173#endif
165174
166175// @TODO: Select the desired logging (see Predef.cmake).
0 commit comments