Corrected alignment of COptional::m_bytes.

This commit is contained in:
Mathew Sutcliffe
2015-06-14 19:51:39 +01:00
parent 7a37c86782
commit ff5e5735b1

View File

@@ -100,7 +100,7 @@ namespace BlackMisc
#else
T &dereference() { Q_ASSERT(m_isValid); return *reinterpret_cast<T *>(m_bytes); }
const T &dereference() const { Q_ASSERT(m_isValid); return *reinterpret_cast<const T *>(m_bytes); }
char m_bytes[sizeof(T)];
typename std::aligned_storage<sizeof(T)>::type m_bytes[1];
#endif
};