|
Boost : |
From: SourceForge.net (noreply_at_[hidden])
Date: 2007-03-21 12:35:30
Bugs item #1685348, was opened at 2007-03-21 12:35
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1685348&group_id=7586
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: goldwynr (goldwynr)
Assigned to: Nobody/Anonymous (nobody)
Summary: program_options: long options use prefix only
Initial Comment:
Using program_options defaults, while scanning for long_options, only the prefix is used.
So long options which begin with the same alphabets result in ambiguous results.
A program which takes --foo(-f), --fool(-l), --fooled(-d) as options currently works like the following:
~/program_options_tests$ ./a.out -f
foo option selected
~/program_options_tests$ ./a.out -l
fool option selected
~/program_options_tests$ ./a.out -d
fooled option selected
~/program_options_tests$ ./a.out --fo
error: ambiguous option fo
~/program_options_tests$ ./a.out --foo
error: ambiguous option foo
~/program_options_tests$ ./a.out --fool
error: ambiguous option fool
~/program_options_tests$ ./a.out --foole
fooled option selected
~/program_options_tests$ ./a.out --fooled
fooled option selected
Expected results:
----------------
./a.out --foo
./a.out --fool
./a.out --fooled
should have been valid options
./a.out --foole
should have been an invalid option
Actual Results:
--------------
./a.out --foo
./a.out --fool
failed.
./a.out --foole
was accepted as --fooled option.
The program used is attached.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1685348&group_id=7586
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Boost-bugs mailing list
Boost-bugs_at_[hidden]
https://lists.sourceforge.net/lists/listinfo/boost-bugs
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk