Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 631452
Collapse All | Expand All

(-)file_not_specified_in_diff (-8 / +4 lines)
Line  Link Here
0
-- a/third_party/crc32c/src/include/crc32c/crc32c.h
0
++ b/third_party/crc32c/src/include/crc32c/crc32c.h
Lines 33-54 Link Here
33
                string.size());
33
                string.size());
34
}
34
}
35
35
36
#if defined(__has_include)
36
#if __cplusplus > 201402L
37
#if __has_include(<string_view>)
37
#if __has_include(<string_view>)
38
// Visual Studio provides a <string_view> header even in C++11 mode. When
39
// included, the header issues an #error. (C1189)
40
#if !defined(_MSC_VER) || __cplusplus >= 201703L
41
#include <string_view>
38
#include <string_view>
42
39
43
// Comptues the CRC32C of the bytes in the string_view.
40
// Computes the CRC32C of the bytes in the string_view.
44
inline uint32_t Crc32c(const std::string_view& string_view) {
41
inline uint32_t Crc32c(const std::string_view& string_view) {
45
  return Crc32c(reinterpret_cast<const uint8_t*>(string_view.data()),
42
  return Crc32c(reinterpret_cast<const uint8_t*>(string_view.data()),
46
                string_view.size());
43
                string_view.size());
47
}
44
}
48
45
49
#endif  // !defined(_MSC_VER) || __cplusplus >= 201703L
50
#endif  // __has_include(<string_view>)
46
#endif  // __has_include(<string_view>)
51
#endif  // defined(__has_include)
47
#endif  // __cplusplus > 201402L
52
48
53
}  // namespace crc32c
49
}  // namespace crc32c
54
50

Return to bug 631452