Closed Bug 1800293 Opened 3 years ago Closed

mfbt: Don't use deprecated std::is_literal_type when compiling as C++20

Categories

(Core :: MFBT, task, P3)

task

Tracking

()

RESOLVED FIXED
109 Branch
Tracking Status
firefox109 --- fixed

People

(Reporter: cpeterson, Assigned: cpeterson)

References

Details

Attachments

(1 file)

std::is_literal_type was deprecated in C++17 and removed in C++20. Continue using it when compiling as C++17 to retain what benefits it does provide for generic code.

The is_literal type trait offers negligible value to generic code, as what is really needed is the ability to know that a specific construction would produce constant initialization. The core term of a literal type having at least one constexpr constructor is too weak to be used meaningfully.

https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0174r2.html

https://en.cppreference.com/w/cpp/types/is_literal_type

std::is_literal_type was deprecated in C++17 and removed in C++20. Continue using it when compiling as C++17 to retain what benefits it does provide for generic code.

The is_literal type trait offers negligible value to generic code, as what is really needed is the ability to know that a specific construction would produce constant initialization. The core term of a literal type having at least one constexpr constructor is too weak to be used meaningfully.

https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0174r2.html

https://en.cppreference.com/w/cpp/types/is_literal_type

Pushed by cpeterson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c7998ea7ac24 mfbt: Don't use std::is_literal_type when compiling as C++20. r=glandium
Status: NEW → RESOLVED
Closed: 3 years ago
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 109 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: