mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-01 05:39:02 +00:00
LibCrypto+LibGfx: Fix GCC 14 compile errors
The C++ standard does not allow specifying the template parameters in constructor declarations, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97202#c8. Converting constructors have a higher priority that user-defined conversion functions; let's constrain `Gfx::Size<T>(Gfx::Size<U>)` to only be considered when `U` is convertible to `T`. This lets us fall back to conversion operators in the case of `UISize` -> `IntSize`, for instance. Clang is still okay without this, but MSVC would error out similarly: https://godbolt.org/z/PTbeYPM7s Note that a not-yet-committed patch is required for full compilation: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114784#c3
This commit is contained in:
parent
291d0e5de8
commit
cc92c3f551
Notes:
sideshowbarker
2024-07-17 08:27:05 +09:00
Author: https://github.com/BertalanD
Commit: cc92c3f551
Pull-request: https://github.com/SerenityOS/serenity/pull/24040
Reviewed-by: https://github.com/alimpfard ✅
2 changed files with 2 additions and 2 deletions
|
@ -23,7 +23,7 @@ public:
|
|||
|
||||
virtual ~CBC() = default;
|
||||
template<typename... Args>
|
||||
explicit constexpr CBC<T>(Args... args)
|
||||
explicit constexpr CBC(Args... args)
|
||||
: Mode<T>(args...)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ public:
|
|||
}
|
||||
|
||||
template<typename U>
|
||||
explicit constexpr Size(Size<U> const& other)
|
||||
requires(IsConstructible<T, U>) explicit constexpr Size(Size<U> const& other)
|
||||
: m_width(other.width())
|
||||
, m_height(other.height())
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue