mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +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:
committed by
Andrew Kaster
parent
291d0e5de8
commit
cc92c3f551
@@ -23,7 +23,7 @@ public:
|
|||||||
|
|
||||||
virtual ~CBC() = default;
|
virtual ~CBC() = default;
|
||||||
template<typename... Args>
|
template<typename... Args>
|
||||||
explicit constexpr CBC<T>(Args... args)
|
explicit constexpr CBC(Args... args)
|
||||||
: Mode<T>(args...)
|
: Mode<T>(args...)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename U>
|
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_width(other.width())
|
||||||
, m_height(other.height())
|
, m_height(other.height())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user