Implement validation functions #4
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
need more info
need verification for fix
not so hard
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-tplgy/cppcodec#4
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
Resulttype that makesput()a no-op, one would merely watch for aparse_errorbeing 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_codeand set that to an error, instead of throwing. This would also make it possible to use cppcodec entirely without RTTI internals.