Closed Bug 1606962 Opened 4 years ago Closed 4 years ago

Remove mozilla::EnableIf

Categories

(Core :: MFBT, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: emilio, Assigned: anba)

References

Details

Attachments

(1 file)

We use mozilla::EnableIf and std::enable_if somewhat inconsistently. Is there any reason we can't just remove mozilla::EnableIf and use the std version?

No real reason. There might be mild aesthetic interest in transitioning away from TypeTraits.h entirely all at once, but it's probably a foolish consistency to do anything more than half-heartedly aspire to that.

Also I never remember if our STL requirements let us use std::enable_if_t yet or not, but that would likely be preferable if it works. I think one of that and stuff like std::integral_constant_v<...> is usable right now, but I couldn't possibly say which without researching it.

Depends on: 1607796
Depends on: 1607826
Assignee: nobody → andrebargull
Status: NEW → ASSIGNED
Pushed by dvarga@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cf661f4a8c95
Replace mozilla::EnableIf with std::enable_if. r=froydnj,jgilbert
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: