Boost logo

Boost Users :

Subject: [Boost-users] boost::program options - why no allow_unregistered() for environmental variable parser?
From: Ivan Godard (igodard_at_[hidden])
Date: 2008-10-15 03:48:54


The environment seems to be the one place that is guaranteed to have
unregistered options, because it is full of things (like
$LD_LIBRARY_PATH) of no interest to the program doing the parsing. A
call on parse_environment always throws on these. As far as I can see in
the code, the way to avoid the throw is to pass parse_enviroment a
function that checks for each of the options that are actually wanted
and returns the null string for the rest. Of course, this duplicates
what the parser just did.

Is there a better way?

Ivan


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net