https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120650
Bug ID: 120650
Summary: Error of requesting %d form month_day_last is not
detected at compile time
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: tkaminsk at gcc dot gnu.org
Target Milestone: ---
The following code throws format_error at runtime, instead of being ill-formed:
```
#include <chrono>
#include <format>
int main()
{
using namespace std::chrono;
auto s = std::format("{:%d}", January/last);
}
```
https://godbolt.org/z/rrGedrhxv