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
But if we use the store_into feature, it is incompatible with required. Namely, it cannot recognize that an argument was passed and stored into the specified variable.
# This works (falls back to default values):
./example
got num_threads = 1 num_boxes = 1
# This raises an exception, as it should
./example --boxes
--boxes: no value provided.
# This also works:
./example --boxes 3
got num_threads = 1 num_boxes = 3
# This raises an exception, as it should
./example --threads
--threads: no value provided.
# This raises an exception, as it should
./example --threads --boxes
--boxes: no value provided.
# This raises an exception, as it should
./example --threads --boxes 3
--threads: no value provided.
# This fails, raising an exception even though `--threads` has a value.
./example --threads 2
--threads: no value provided.
# This raises an exception, as it should
./example --threads 2 --boxes
--boxes: no value provided.
# This fails, raising an exception even though `--threads` has a value.
./example --threads 2 --boxes 3
--threads: no value provided.
The text was updated successfully, but these errors were encountered:
Previously in #33 a helpful feature
required()
was added with these rules:(see also A way to require "optional" arguments to present #27)
But if we use the
store_into
feature, it is incompatible withrequired
. Namely, it cannot recognize that an argument was passed and stored into the specified variable.MWE:
Test script:
Output (edited for clarity):
The text was updated successfully, but these errors were encountered: