Skip to content

exclude fallback functions when FMT_BUILTIN_CLZ(LL) is not defined - #2434

Merged
vitaut merged 4 commits into
fmtlib:masterfrom
bodomartin:master
Jul 25, 2021
Merged

vitaut merged 4 commits into
fmtlib:masterfrom
bodomartin:master

Conversation

@bodomartin

Copy link
Copy Markdown

Trivial change to format.h to exclude fallback functions when FMT_BUILTIN_CLZ and FMT_BUILTIN_CLZLL
are not available. Happens to me on windows clangcl msvc codegen

Signed-off-by: Bodo Martin <bodo.martin@aci.uni-heidelberg.de>

@vitaut vitaut left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the PR. LGTM but please address inline comments.

Comment thread include/fmt/format.h Outdated

// It is a separate function rather than a part of count_digits to workaround
// the lack of static constexpr in constexpr functions.
#ifdef FMT_BUILTIN_CLZLL

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please move the #ifdef right before the comment:

#ifdef FMT_BUILTIN_CLZLL
// It is a separate function rather than a part of count_digits to workaround
// the lack of static constexpr in constexpr functions.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

done

Comment thread include/fmt/format.h Outdated

// It is a separate function rather than a part of count_digits to workaround
// the lack of static constexpr in constexpr functions.
#ifdef FMT_BUILTIN_CLZ

@vitaut vitaut Jul 25, 2021

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

same here

@vitaut
vitaut marked this pull request as ready for review July 25, 2021 17:36
@vitaut
vitaut merged commit 0544a22 into fmtlib:master Jul 25, 2021
@vitaut

vitaut commented Jul 25, 2021

Copy link
Copy Markdown
Contributor

Thank you!

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