Boost logo

Boost Users :

Subject: [Boost-users] Changing format of program_options
From: Heikki Virtanen (heikki.a.virtanen_at_[hidden])
Date: 2013-09-02 16:08:34

Hi, I have tried to read config file using boost::program_options
where I have large floating pointing numbers like

test = 1.432e43

but seems that I get bad an error message
"boost::bad_any_cast: failed conversion using boost::any_cast"
when I am reading the value from program_options::variables_map.
Reading works perfectly when I am using numbers like

a = 13.62

but scientific format fails. Should I tell to variables_map somehow
what is the format of floating point numbers or should I do
something else?


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at