mfbt: Don't use deprecated std::is_literal_type when compiling as C++20
Categories
(Core :: MFBT, task, P3)
Tracking
()
| 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_literaltype 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
| Assignee | ||
Comment 1•3 years ago
|
||
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_literaltype 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
Comment 3•3 years ago
|
||
| bugherder | ||
Comment 4•3 years ago
|
||
| bugherder | ||
Description
•