On 6/5/2018 8:51 AM, Xavier Besseron wrote:
Dear Jim,
I remember having some troubles using |boost::optional| with |boost::program_options|. I fixed it by adding the following lines: [snip]
Wow, thanks! I think this is what I needed to get something resolved here. I actually did something *very* similar to the code you wrote (I think there's a sample of something like this buried in the program_options docs somewhere) and totally forgot. Taking a fresh look at the compilation error, I see that it passes through this function in the middle of the template instantiation stack, so this is almost certainly involved in the problem. Now, why my `validate` function only fails when I'm using MSVC (I tested it on VS2017 and it still happens there) with boost::optional (as opposed to std::optional) and Boost 1.62+, I'm still not sure. It's possible there's still a bug here, but I'll have to continue investigating. - Jim