-
Notifications
You must be signed in to change notification settings - Fork 290
Open
Description
argparse/include/argparse/argparse.hpp
Line 714 in d924b84
| var = details::parse_number<T, details::radix_10>()(s); |
store_into treats all numbers as decimal numbers, which is incorrect.
If we use:
uint64_t foo;
program.add_argument("foo")
.scan<'x', uint64_t>()
.store_into(foo);./foo 0xABCD
!!! std::invalid_argument will be thrown: pattern '0xABCD' does not match to the end
But program.get<uint64_t>() can work properly.
Another observation is that when using get<T>, the parsing only happens once, while store_into happens twice. I think this could be optimized. 🤔
Metadata
Metadata
Assignees
Labels
No labels