Skip to content

Commit

Permalink
Remove incompatible BUILD.bazel support via rename. Update string.h f…
Browse files Browse the repository at this point in the history
…or C++ 20.
  • Loading branch information
Dat Chu committed Aug 3, 2023
1 parent 062662b commit a07f07b
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 3 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 1 addition & 3 deletions c++/src/kj/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,7 @@ class StringPtr {
inline StringPtr(const char8_t* begin KJ_LIFETIMEBOUND, const char8_t* end KJ_LIFETIMEBOUND)
: StringPtr(reinterpret_cast<const char*>(begin), reinterpret_cast<const char*>(end)) {}
// KJ strings are and always have been UTF-8, so screw this C++20 char8_t stuff.
#endif

#if __cplusplus >= 202000L
#elif __cplusplus >= 202000L
inline StringPtr(const char8_t* value): StringPtr(reinterpret_cast<const char*>(value)) {}
inline StringPtr(const char8_t* value, size_t size)
: StringPtr(reinterpret_cast<const char*>(value), size) {}
Expand Down

0 comments on commit a07f07b

Please sign in to comment.