Closed Bug 869194 Opened 10 years ago Closed 10 years ago

CheckedInt should consistently reject unsupported types

Categories

(Core :: MFBT, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: adw, Assigned: bjacob)

References

Details

Attachments

(1 file)

Bug 869188 describes a compiler error due to initializing a CheckedInt<int32> from a float value.  CheckedInt should consistently and helpfully reject this.

Benoit, please correct me if I missed or got something wrong in the description here.
You got this absolutely right. In addition, binary operators between CheckedInts and floats should also fail to compile.

Self assigning.
Assignee: nobody → bjacob
Attachment #746108 - Flags: review?(jwalden+bmo) → review+
Summary: CheckedInt should consistently and helpfully reject initialization from float value → CheckedInt should consistently reject unsupported types
Depends on: 869685
Depends on: 869188
https://hg.mozilla.org/mozilla-central/rev/e725c1aa589d
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.