Skip to content

Conversation

@ericniebler
Copy link
Contributor

"ssource-t" in exec.spawn.future/p6 should be in code font.

image

@tkoeppe
Copy link
Contributor

tkoeppe commented Nov 4, 2025

Thanks, @ericniebler! Yes, it seems quite a common gotcha that the \placeholder macro does not also imply "code" and that you need both. Maybe we should call that out on the wiki.

Could you please update the commit message according to our standard format https://github.com/cplusplus/draft/wiki/Commit-message-format with the positional reference? (And the change text can just say "add missing \tcode".) Thanks!

@ericniebler
Copy link
Contributor Author

I presume there is a reason why \placeholder does not imply \tcode?

@ericniebler ericniebler changed the title Format type placeholder in code font for consistency [exec.spawn.future] add missing \tcode Nov 4, 2025
@eisenwave
Copy link
Member

eisenwave commented Nov 4, 2025

@ericniebler \placeholder is also being used in various other places as a mathematical/general placeholder, and there was a suggestion to make it render as math font even within code at some point. Unlike \exposid, it is a situational macro and doesn't always mean code.

I think what trips people up is that in code blocks and in places like \tcode{int\placeholder{N}_t}, we don't add extra code font for the placeholder; it's obtained from the context. Also, \exposid and \placeholder render the same in code, so one would assume they're interchangeable, but only \exposid adds code font everywhere. It's really quite surprising.

@tkoeppe tkoeppe merged commit 3c5095a into cplusplus:main Nov 4, 2025
2 checks passed
@tkoeppe
Copy link
Contributor

tkoeppe commented Nov 4, 2025

exposid is semantically different in that its argument is the entire identifier. placeholder is more a general "placeholder", which (as in the intN_t example) can be used in a variety of ways and places.

@ericniebler ericniebler deleted the ericniebler-patch-2 branch November 4, 2025 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants