Skip to content

Commit

Permalink
Replace std::integral concept with requires clause because Apple …
Browse files Browse the repository at this point in the history
…Clang doesn't support it yet (hsutter#963)

Apple Clang doesn't support the `std::integral` concept yet.

Signed-off-by: Neil Henderson <2060747+bluetarpmedia@users.noreply.github.com>
  • Loading branch information
bluetarpmedia committed Feb 5, 2024
1 parent 6af78c9 commit f146ef7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,9 @@ auto contains(


// Print an integer with 1,000's separators (always commas, not locale-driven)
auto print_with_thousands(std::integral auto val)
template <typename T>
requires std::is_integral_v<T> // Note: `std::integral` concept not yet available in Apple Clang
auto print_with_thousands(T val)
-> std::string
{
auto ret = std::to_string(val % 10);
Expand Down

0 comments on commit f146ef7

Please sign in to comment.