Boost logo

Boost Users :

Subject: Re: [Boost-users] Program Options and Filesystem ifstream
From: Scott Morgan (blumf_at_[hidden])
Date: 2015-08-19 04:59:52


On 18/08/15 21:20, Sergiu Dotenco wrote:
> Your are trying to pass a temporary to a reference parameter, which is
> wrong.
>
> Try instead:
>
> fs::ifstream in(cfg_path);
> po::store(po::parse_config_file(in, cfg_desc, true), options);

Ah, that works, thanks!

So, was the MSVC compiler accepting the temporary incorrect behaviour?

Scott


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