From dfcd4484d303b0ba282095367d68820ae6544754 Mon Sep 17 00:00:00 2001 From: Neil Henderson <2060747+bluetarpmedia@users.noreply.github.com> Date: Tue, 6 Feb 2024 03:58:51 +1000 Subject: [PATCH] Replace `std::integral` concept with `requires` clause because Apple Clang doesn't support it yet (#963) Apple Clang doesn't support the `std::integral` concept yet. Signed-off-by: Neil Henderson <2060747+bluetarpmedia@users.noreply.github.com> --- source/common.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/common.h b/source/common.h index 07c3b496ac..5cd466ec5f 100644 --- a/source/common.h +++ b/source/common.h @@ -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 + requires std::is_integral_v // 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);