mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:24:57 +00:00
AK: Allow default-constructing DistinctNumeric
This makes it much more useful as a replacement type for integers. It's zeroed out by default.
This commit is contained in:
parent
e44c1792a7
commit
900865975a
1 changed files with 5 additions and 1 deletions
|
@ -70,6 +70,10 @@ class DistinctNumeric {
|
|||
using Self = DistinctNumeric<T, X, Incr, Cmp, Bool, Flags, Shift, Arith>;
|
||||
|
||||
public:
|
||||
DistinctNumeric()
|
||||
{
|
||||
}
|
||||
|
||||
DistinctNumeric(T value)
|
||||
: m_value { value }
|
||||
{
|
||||
|
@ -292,7 +296,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
T m_value;
|
||||
T m_value {};
|
||||
};
|
||||
|
||||
// TODO: When 'consteval' sufficiently-well supported by host compilers, try to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue