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). Cheers, Filip
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
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.
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, Thanks a lot, I'm fine with an #if solution for Boost 1.42. I was not aware that a fix for this is already in the trunk, so I wanted to point this out. Cheers, Filip
participants (2)
-
Filip Konvička
-
Vladimir Prus