-
-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Description
I have a program parsing some required options, some optional options, and I'm trying to also check if some flags are set. From what I understand, I need to:
- initialise a bool like
bool testBool = false - add option to parser like
| lyra::opt(testBool)["-t"]["--testbool"]("Test bool");
After this, I can then parse argc and argv, and check for testBool being passed likeif (testBool) { std::cout << "TestBool = y" << std::endl; }
However, if I have any bools in my lyra arg parser, my program seems to work fine until my main function returns, after which I get
free(): invalid pointer
Aborted: core dumped
if I pass -t to my executable.
Does anyone else experience this issue? (There is a decent chance that this is not actually a problem with lyra itself, but maybe a problem with my c++ skills, I am very new to this lang)
Metadata
Metadata
Assignees
Labels
No labels