From b325c54968789e9e2cb6690e5eef98f06f5ecdf1 Mon Sep 17 00:00:00 2001 From: sha512sum Date: Mon, 30 Sep 2024 15:17:26 +0000 Subject: [PATCH] Fix for libstdc++ with clang --- CMakeLists.txt | 3 +-- src/constexpr_string.cpp | 2 +- src/utils.cpp | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 223409f..fc42457 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,10 +51,9 @@ set(CPM_USE_LOCAL_PACKAGES OFF) CPMAddPackage( NAME fmt URL - "https://github.com/linuxnyasha/fmt_import/archive/refs/heads/linuxnyasha-patch-1.zip" + "https://github.com/fmtlib/fmt/releases/download/11.0.2/fmt-11.0.2.zip" EXCLUDE_FROM_ALL ON OPTIONS "FMT_MODULE ON" - # Fixes for fmt module and constexpr fmt::formatted_size ) set(CPM_USE_LOCAL_PACKAGES ${TMP}) diff --git a/src/constexpr_string.cpp b/src/constexpr_string.cpp index d9628a6..f736c55 100644 --- a/src/constexpr_string.cpp +++ b/src/constexpr_string.cpp @@ -32,7 +32,7 @@ struct ConstexprString { constexpr ConstexprString(const char (&data)[Size]) : data{} { // NOLINT std::ranges::copy_n(data, Size, this->data.begin()); }; - explicit constexpr ConstexprString(std::string data) : data{} { + explicit constexpr ConstexprString(std::string_view data) : data{} { std::ranges::copy_n(data.begin(), Size, this->data.begin()); }; explicit constexpr ConstexprString(std::array data) : data(std::move(data)) {}; diff --git a/src/utils.cpp b/src/utils.cpp index 4eb9565..4c9efae 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -12,7 +12,7 @@ import utempl.type_list; import utempl.overloaded; #else - +#include #include #include #include