mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-23 02:55:15 +00:00
![]() Due to overload resolutions rules, this simple code provokes a crash: ReadonlyBytes readonly_bytes{}; FixedMemoryStream stream{readonly_bytes}; ReadonlyBytes give_them_back{stream.bytes()}; // -> Panics on VERIFY(m_writing_enabled); // but this is fine: auto bytes = static_cast<FixedMemoryStream const&>(*stream).bytes() If we need to be explicit about it, let's rename the overload instead of adding that `static_cast`. |
||
---|---|---|
.. | ||
Applets | ||
Applications | ||
BuggieBox | ||
Demos | ||
DevTools | ||
DynamicLoader | ||
Games | ||
Libraries | ||
Services | ||
Shell | ||
Utilities | ||
CMakeLists.txt |