$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [program_options] allow_guessing issue
From: Vladimir Prus (ghost_at_[hidden])
Date: 2010-02-25 15:59:05
Filip KonviÄka wrote:
> Hi,
> 
> I've just upgraded to boost 1.42 from 1.40, and it seems that the new 
> feature 'allow_guessing', a default setting, breaks my existing code. I 
> have two options: "lang" and "lang-dir", the first obviously a prefix of 
> the other, and when my program is run with "--lang=en_US --lang-dir=.", 
> the first argument is interpreted as "lang-dir". Even though the 
> documentation says somewhere that one argument should not be a prefix of 
> another with 'allow_guessing' on, this is a breaking change and should 
> be put in a big red box somewhere on the front page :-)
> 
> If the change is intended to be kept for the future, it would be wise to 
> detect the problem by examining the options, rather than wait until 
> another problem occurs (in my case, the runtime exception is 
> 'multiple_options' when the user uses both options, and - much worse! - 
> the option gets misinterpreted without a warning if he only uses the 
> shorter option).
Filip,
this was unfortunate breakage that was corrected in trunk:
        https://svn.boost.org/trac/boost/changeset/59744
You would have to apply this patch to your copy.
- Volodya