-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An encoder for base 64 #2028
An encoder for base 64 #2028
Conversation
// Same as above but the storage is allocated by the callee. | ||
inline UniqueArray<char> Encode(Array<std::uint8_t const> input) override; | ||
|
||
// Length of the encoded form, in char16_t. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not add comments that are redundant with the base class, let alone contradictory (char16_t
?).
void principia::base::internal_base64::Base64Encoder<null_terminated>::Encode( | ||
Array<std::uint8_t const> input, | ||
Array<char> output) { | ||
std::string_view const input_view(reinterpret_cast<const char*>(input.data), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have string_view on mac?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non lo so. There is an absl::string_view
. We'll switch to that if Linux/macOS doesn't have the std
version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can always summon the most boring kind of UB by
#if OS_MACOSX
namespace std {
using absl::string_view;
} // namespace std
#endif
No description provided.