I'm trying to compile a program released by Dalal and Triggs which uses the Boost libraries. I got an error in the Boost method validation_error
due to the differences between version which the authors used (1.35
) and the one that I'm using (1.46
).
In the old version, the validation_error
method used by the authors had the following structure:
validation_error(const std::string & what);
And the version of Boost I'm running has the following:
validation_error(kind_t kind, const std::string & option_value = "",
const std::string & option_name = "");
In the code, the authors are passing a string
to the old validation_error
method (example below).
std::ostringstream ost;
ost << "value " << *value
<< " greater than max value " << max;
throw po::validation_error(ost.str());
How can I pass this string
to the new version of validation_error
?