We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 21fc8ef commit 9d0fb14Copy full SHA for 9d0fb14
include/crc32c/crc32c.h
@@ -59,6 +59,13 @@ inline uint32_t Crc32c(const char* data, size_t count) {
59
return Extend(0, reinterpret_cast<const uint8_t*>(data), count);
60
}
61
62
+#ifdef __cpp_lib_byte
63
+// Computes the CRC32C of "count" bytes in the buffer pointed by "data".
64
+inline uint32_t Crc32c(const std::byte* data, size_t count) {
65
+ return Extend(0, reinterpret_cast<const uint8_t*>(data), count);
66
+}
67
+#endif
68
+
69
// Computes the CRC32C of the string's content.
70
inline uint32_t Crc32c(const std::string& string) {
71
return Crc32c(reinterpret_cast<const uint8_t*>(string.data()),
0 commit comments