Skip to content

[vector.bool.fmt][container.adaptors.format] Add missing constexpr#8768

Merged
jensmaurer merged 1 commit intocplusplus:mainfrom
frederick-vs-ja:fmt-constexpr-containers
Mar 22, 2026
Merged

[vector.bool.fmt][container.adaptors.format] Add missing constexpr#8768
jensmaurer merged 1 commit intocplusplus:mainfrom
frederick-vs-ja:fmt-constexpr-containers

Conversation

@frederick-vs-ja
Copy link
Contributor

This PR completes the previously missing constexpr addition from P3391R2 and consistently adds constexpr to function descriptions.

This PR completes the previously missing `constexpr` addition from
P3391R2 and consistently adds `constexpr` to function descriptions.
@eisenwave eisenwave added the P1-Important Misapplication of paper, malformed code, internal inconsistencies label Feb 25, 2026
@jensmaurer jensmaurer added the changes requested Changes to the wording or approach have been requested and not yet applied. label Mar 20, 2026
@jensmaurer jensmaurer requested a review from jwakely March 20, 2026 07:39
\tcode{priority_queue}, and
\tcode{stack},
the library provides the following formatter specialization
the library provides the following constexpr-enabled formatter specialization
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"constexpr-enabled" does not imply "enabled" according to [format.formatter.spec], so this is a normative change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's just a missing edit from the application of P3391, and similarly for the next change below.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So yes, it is a normative change, but one that was approved at plenary.

Copy link
Member

@jensmaurer jensmaurer Mar 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, you're saying this is a missed edit from the application of P3391R2, beyond a few sprinkled "constexpr" annotations ? That would be good to say in the commit comment.

But that causes an LWG issue, because "constexpr-enabled" doesn't imply "enabled", I think.

Copy link
Member

@jwakely jwakely Mar 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have:

If the library provides an explicit or partial specialization of formatter<T, charT>, that specialization is enabled and meets the Formatter requirements except as noted otherwise.

So I think these specializations are enabled just by virtue of being present in the library spec. We don't also need to say they're enabled

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

@jensmaurer jensmaurer merged commit dc5928b into cplusplus:main Mar 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changes requested Changes to the wording or approach have been requested and not yet applied. P1-Important Misapplication of paper, malformed code, internal inconsistencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants