You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes I'm not interested in actually decoding a base-N string into its binary form, I just want to know whether it's valid and then keep it as encoded string.
I was thinking that the current API makes this possible with an empty Result type that makes put() a no-op, one would merely watch for a parse_error being thrown. This could be wrapped in an API like this:
It would also be nice if this method didn't throw internally, because that will hit gdb/lldb when listening for arbitrary throws. Given that, the decode() functions should probably expose more overloads that take a std::error_code and set that to an error, instead of throwing. This would also make it possible to use cppcodec entirely without RTTI internals.
The text was updated successfully, but these errors were encountered:
Sometimes I'm not interested in actually decoding a base-N string into its binary form, I just want to know whether it's valid and then keep it as encoded string.
I was thinking that the current API makes this possible with an empty
Result
type that makesput()
a no-op, one would merely watch for aparse_error
being thrown. This could be wrapped in an API like this:It would also be nice if this method didn't throw internally, because that will hit gdb/lldb when listening for arbitrary throws. Given that, the
decode()
functions should probably expose more overloads that take astd::error_code
and set that to an error, instead of throwing. This would also make it possible to use cppcodec entirely without RTTI internals.The text was updated successfully, but these errors were encountered: