From f2f93987c3e180a7be86fa5e7774fa323f2063fa Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Thu, 15 Feb 2024 12:21:47 -0700 Subject: [PATCH] Fix static_string.cpp compilation with MSVC standard library std::array's iterator is a pointer in libc++ and libstdc++ so `const auto*` works fine. However the array iterator is not a pointer on MSVC so compilation fails. Removing the asterisk still results in a pointer type being used but causes a clang-tidy check to fail so we have to disable that. --- tests/static_string.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/static_string.cpp b/tests/static_string.cpp index 9b570ca..ecbfed4 100644 --- a/tests/static_string.cpp +++ b/tests/static_string.cpp @@ -22,7 +22,7 @@ TEST_CASE("rsl::StaticString") { auto const string = "Hello, world!"s; auto const static_string = rsl::StaticString<14>(string); CHECK(static_string.begin() != static_string.end()); - auto const* begin = static_string.begin(); + auto begin = static_string.begin(); // NOLINT(readability-qualified-auto) CHECK(*begin++ == 'H'); CHECK(*begin++ == 'e'); CHECK(*begin++ == 'l');