mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
refs #504 Fixed MSVC2013 compiler error regression.
This commit is contained in:
@@ -101,9 +101,9 @@ namespace BlackMisc
|
||||
};
|
||||
Data m_data;
|
||||
#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); }
|
||||
typename std::aligned_storage<sizeof(T)>::type m_bytes[1];
|
||||
T &dereference() { Q_ASSERT(m_isValid); return *reinterpret_cast<T *>(m_data.bytes); }
|
||||
const T &dereference() const { Q_ASSERT(m_isValid); return *reinterpret_cast<const T *>(m_data.bytes); }
|
||||
struct { typename std::aligned_storage<sizeof(T)>::type bytes[1]; } m_data;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user