Silence spurious std::to_array() warning

On GCC 12.2.
This commit is contained in:
Robbert van der Helm
2022-12-23 19:59:52 +01:00
parent 11d176257f
commit 399db4d2fc
+7
View File
@@ -66,10 +66,17 @@ const Steinberg::Vst::TChar* u16string_to_tchar_pointer(
#endif
}
// GCC 12.2's `std::to_array()` throws spurious array access out of bounds
// warnings
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
WineUID::WineUID() noexcept {}
WineUID::WineUID(const Steinberg::TUID& tuid) noexcept
: uid_(std::to_array(tuid)) {}
#pragma GCC diagnostic pop
ArrayUID WineUID::get_native_uid() const noexcept {
// We need to shuffle the first 8 bytes around to convert between the
// COM-compatible and non COM-compatible formats described by the