boost 1.91 optional changes broke build of AUR/mongodb44, need C++ help
All, Boost/boostlib 1.91 changes to boost::optional broke the build of https://aur.archlinux.org/packages/mongodb44 Most of these issues I can fix, but I'm stuck on this one unsure how to resolve the issue. (so I'm raising the white-flag for help) The error is: src/mongo/db/catalog/coll_mod.cpp:361:32: error: converting to 'boost::optional<mongo::ViewDefinition>' from initializer list would use explicit constructor 'constexpr boost::optional<T>::optional(U&&) [ with U = mongo::ViewDefinition&; typename std::enable_if<std::is_constructible<T, U&&>::value, bool>::type <anonymous> = false; typename std::enable_if<(! boost::optional_detail::is_typed_in_place_factory<FT>::value), bool>::type <anonymous> = false; typename std::enable_if<(! boost::optional_detail::is_in_place_factory<FT>::value), bool>::type <anonymous> = false; T = mongo::ViewDefinition ]' The code at issue is: boost::optional<ViewDefinition> view; if (db && !coll) { const auto sharedView = ViewCatalog::get(db)->lookup(opCtx, nss.ns()); if (sharedView) { // We copy the ViewDefinition as it is modified below to represent the requested state. view = {*sharedView}; } } There were changes to boost::optional for c++17 at https://www.boost.org/releases/1.91.0/ and I think I've tracked the issue to https://stackoverflow.com/q/72712318/3422102 and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109247, but even with that information I'm still not sure how to use that information to resolve the constructor selection issue. The A/B test cases in the SO question leave me scratching my head on how that applies here, if it does? I've opened an Arch forum thread to discuss the issue. https://bbs.archlinux.org/viewtopic.php?pid=2295971#p2295971 The full error and additional information on the problem is posted there. If you can help, please join me there. I've included a header inclusion patch for a preliminary standard_assert issue in the forum thread if you would like to build to error to confirm. (it's a big build, it fails at about 30 minutes of a 45 minute build) -- David C. Rankin, J.D.,P.E.
On 4/26/26 4:02 PM, David C Rankin wrote:
All,
Boost/boostlib 1.91 changes to boost::optional broke the build of https://aur.archlinux.org/packages/mongodb44
Thanks to Seth's help in the forum post, the issue was solved. https://bbs.archlinux.org/viewtopic.php?pid=2295971#p2295971 -- David C. Rankin, J.D.,P.E.
participants (1)
-
David C Rankin