Skip to content

Commit 81aad96

Browse files
update examples_test submodule pointer, add some const correctness stuff
1 parent 599529d commit 81aad96

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

examples_tests

Submodule examples_tests updated 94 files

include/nbl/system/IAsyncQueueDispatcher.h

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,24 +232,34 @@ class IAsyncQueueDispatcherBase
232232
}
233233

234234
//!
235-
inline explicit operator bool()
235+
inline explicit operator bool() const
236236
{
237237
return m_future;
238238
}
239-
inline bool operator!()
239+
inline bool operator!() const
240240
{
241241
return !m_future;
242242
}
243243

244244
//!
245-
inline T* operator->() const
245+
inline const T* operator->() const
246246
{
247247
if (m_future)
248248
return m_future->getStorage();
249249
return nullptr;
250250
}
251+
inline T* operator->()
252+
{
253+
if (m_future)
254+
return m_future->getStorage();
255+
return nullptr;
256+
}
257+
258+
//!
259+
template<typename U=T> requires (std::is_same_v<U,T> && !std::is_void_v<U>)
260+
inline const U& operator*() const {return *operator->();}
251261
template<typename U=T> requires (std::is_same_v<U,T> && !std::is_void_v<U>)
252-
inline U& operator*() const {return *operator->();}
262+
inline U& operator*() {return *operator->();}
253263

254264
//! Can only be called once!
255265
inline void discard()

0 commit comments

Comments
 (0)