Boost logo

Boost :

From: SourceForge.net (noreply_at_[hidden])
Date: 2007-04-17 03:11:05


Bugs item #1701992, was opened at 2007-04-17 00:11
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=1701992&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: Alexis Wilke (alexis_wilke)
Assigned to: Nobody/Anonymous (nobody)
Summary: [program_options] improper guess

Initial Comment:
I found a problem in the program_options when using the allow_guessing style (which is the default).

The option_description::match() function (boost_1_33_1/libs/program_options/src/options_description.cpp) checks option names approximatively only if the allow_guessing is turned on.

The match() function needs to return three values: definitively not this option, definitively this option or maybe this option. In the first case, you try the next option (see options_description::find_nothrow() in the same file). In the second case, you return with that very option. In the third case, you try the next options. If at the very end, you did not find a definitive option and you found more than 2 matching approximetly, then you generate the error (more than one approx. matched!). And if nothing matched, you generate that other error.

This is only partially fixed in Debian and I'm attaching that fix below. The problem in the Debian fix is that if the valid full definitive option is to be found AFTER two other partial options, it also breaks (duh! am I the only one to understand this logic?! it seems so simple!)

I did not understand the 1.34.0 yet and thus I did not see the fix there...

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107586&aid=1701992&group_id=7586

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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