Closed yurivict closed 6 months ago
Can you give me a minimal piece of code that reproduces this, and which compiler and other compile flags are you using?
Here is the code that compiled before and doesn't compile now:
#include <cxxopts.hpp>
#include <optional>
#include <string>
int main(int argc, char** argv) {
cxxopts::Options opts("appName", "0");
std::optional<bool> minimized(false);
bool enableDebugLogs = false;
std::string torrents;
opts.add_options(
)("v,version", "display version information", cxxopts::value<bool>()->default_value("false")
)("h,help", "display this help", cxxopts::value<bool>()->default_value("false")
)("m,minimized", "start minimized in notification area", cxxopts::value(minimized)->default_value("false")
)("d,debug-logs", "enable debug logs", cxxopts::value(enableDebugLogs)->implicit_value("true")
)("torrents", "", cxxopts::value(torrents));
}
This project breaks.
clang-16.0.6 FreeBSD 14.0
@jarro2783 Could you please fix this and make another release with the fix, because currently the FreeBSD port for Tremotesf2 is broken because of this problem.
Thanks for the code to reproduce it, I'll see what I can do and make a new release.
It breaks with ddc695e. It's a bit mysterious, I'm trying to work out what it was calling before that change.
That was easy, turns out some functions were defined in the wrong order. I've just pushed a fix to a branch if you want to test it. I'll get it merged and tag a new version in a couple of hours.
Sorry, I won't be able to test it. As long as this testcase builds - it probably should be fine.
I find a 3.2.1 tag with this fix but no release. Can the release be added?
log
FreeBSD 14.0