Closed Bug 1927545 Opened 1 year ago Closed 1 year ago

`...fmt/format.h(3466,8): error: variable of non-literal type 'DTSC' (aka 'double_conversion::DoubleToStringConverter') cannot be defined in a constexpr function before C++23` with C++20 enabled

Categories

(Firefox Build System :: General, defect)

Firefox 131
defect

Tracking

(firefox-esr115 unaffected, firefox-esr128 unaffected, firefox132 unaffected, firefox133 wontfix, firefox134 fixed)

RESOLVED FIXED
134 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- unaffected
firefox132 --- unaffected
firefox133 --- wontfix
firefox134 --- fixed

People

(Reporter: nalexander, Assigned: nalexander)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Folks, some code that used to compile is now failing with some constexpr stuff:

In file included from C:/Users/nalexander/Mozilla/gecko.git/toolkit/mozapps/pushproxy/pushproxy.cpp:5:
In file included from C:/Users/nalexander/Mozilla/objdirs/objdir-browser-compile/dist/include\mozilla/CmdLineAndEnvUtils.h:20:
In file included from C:/Users/nalexander/Mozilla/objdirs/objdir-browser-compile/dist/include\mozilla/Vector.h:25:
In file included from C:/Users/nalexander/Mozilla/objdirs/objdir-browser-compile/dist/include\mozilla/Span.h:36:
In file included from C:/Users/nalexander/Mozilla/objdirs/objdir-browser-compile/dist/include\mozilla/Casting.h:15:
C:/Users/nalexander/Mozilla/objdirs/objdir-browser-compile/dist/include\fmt/format.h(3466,8): error: variable of non-literal type 'DTSC' (aka 'double_conversion::DoubleToStringConverter') cannot be defined in a constexpr function before C++23
 3466 |   DTSC converter(DTSC::NO_TRAILING_ZERO |
      |        ^
C:/Users/nalexander/Mozilla/objdirs/objdir-browser-compile/dist/include\double-conversion/double-to-string.h(36,7): note: 'DoubleToStringConverter' is not literal because it is not an aggregate and has no constexpr constructors other than copy or move constructors
   36 | class DoubleToStringConverter {
      |       ^
1 error generated.

This is in a standalone binary with some unusual flags, including

        "-Xclang",
        "-fcxx-exceptions",
        "-Xclang",
        "-std=c++20",

It would be nice to accommodate C++20 for when we do, in fact, switch over.

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 134 Branch

The patch landed in nightly and beta is affected.
:nalexander, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox133 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(nalexander)

This doesn't need an unmotivated uplift. If we somehow end up with C++20 in Beta, we can uplift then.

Flags: needinfo?(nalexander)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: