Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to clear ambiguous compile time claims #1775

Merged
merged 2 commits into from
Jul 16, 2020
Merged

Conversation

leolchat
Copy link
Contributor

@leolchat leolchat commented Jul 15, 2020

Documentation was a bit misleading. Many people quickly assume that fmt does compile time checks by default, while it requires the use of FMT_STRING. It was also unclear that FMT_COMPILE does the same checks.

See initial discussion here: #1772

I agree that my contributions are licensed under the {fmt} license, and agree to future changes to the licensing.

Documentation was a bit misleading.
Many people assume that fmt does compile time checks by default, while it requires the use of `FMT_STRING`.
It was also unclear that FMT_COMPILE does the same checks.

fmtlib#1772
Copy link
Contributor

@vitaut vitaut left a comment

Choose a reason for hiding this comment

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

Thank you. Looks good with two minor comments.

doc/api.rst Outdated
Compile-time checks are supported for built-in and string types as well as
user-defined types with ``constexpr`` ``parse`` functions in their ``formatter``
specializations.
Compile-time checks are enabled when using ``FMT_STRING``. It supports built-in
Copy link
Contributor

Choose a reason for hiding this comment

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

It supports -> They support

doc/api.rst Outdated
Comment on lines 121 to 122
When the compiler supports UDL templates extensions, using the litteral string
``""_format()`` will also enable compile-time checks.
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest dropping this part because the extension is obsolete (gcc even warns on it now). FMT_STRING is the only recommended API for compile-time checks.

@vitaut vitaut merged commit f5d4215 into fmtlib:master Jul 16, 2020
@vitaut
Copy link
Contributor

vitaut commented Jul 16, 2020

Thanks

@leolchat leolchat deleted the patch-1 branch July 16, 2020 15:20
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.

2 participants