OSDN Git Service

Work around absence of std::span constructor with clang 14.0.0 vauto3.0.0-alpha86-5fe4296cb
authorEric Branlund <ebranlund@fastmail.com>
Sat, 1 Jul 2023 20:40:37 +0000 (14:40 -0600)
committerEric Branlund <ebranlund@fastmail.com>
Sat, 1 Jul 2023 20:40:37 +0000 (14:40 -0600)
src/util/sha256.cpp

index 8b5d14a..1f2a275 100644 (file)
@@ -142,7 +142,7 @@ void SHA256::update(const std::byte *message_array, size_t length)
  */
 void SHA256::update(std::string_view message)
 {
-    const auto message_as_byte = std::as_bytes(std::span(message));
+    const auto message_as_byte = std::as_bytes(std::span(message.begin(), message.size()));
     this->update(message_as_byte.data(), message_as_byte.size_bytes());
 }