mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
AK: Define FloatingPointExponentialForm comparator in the AK namespace
This isn't an issue now because this is only invoked from a macro that is expanded within this file. But in an upcoming commit, it will be invoked from a helper function in the Test namespace. At that point, the compiler complains about the comparitor not being found (and helpfully indicates we should move this one to the AK namespace to allow ADL to succeed).
This commit is contained in:
parent
831e5ed4e2
commit
d57d14fc19
Notes:
github-actions[bot]
2024-08-13 12:14:02 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/d57d14fc192 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1041
1 changed files with 5 additions and 1 deletions
|
@ -8,11 +8,15 @@
|
|||
#include <AK/StringFloatingPointConversions.h>
|
||||
#include <LibTest/TestCase.h>
|
||||
|
||||
static bool operator!=(AK::FloatingPointExponentialForm a, AK::FloatingPointExponentialForm b)
|
||||
namespace AK {
|
||||
|
||||
static bool operator!=(FloatingPointExponentialForm a, FloatingPointExponentialForm b)
|
||||
{
|
||||
return a.sign != b.sign || a.exponent != b.exponent || a.fraction != b.fraction;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
template<>
|
||||
struct AK::Formatter<AK::FloatingPointExponentialForm> : Formatter<FormatString> {
|
||||
ErrorOr<void> format(FormatBuilder& builder, AK::FloatingPointExponentialForm value)
|
||||
|
|
Loading…
Reference in a new issue