Files
nixpkgs/pkgs/development/python-modules/ifcopenshell/boost-1.91-optional.patch
Samuel Rounce 2664acf787 python3Packages.ifcopenshell: fix build with boost 1.91
boost 1.91 rewrote boost::optional and its converting constructor is
now unconditionally explicit, breaking the aggregate brace-init of the
radius member in the profile_point structs in src/ifcgeom. Switch those
members to std::optional, which keeps a non-explicit converting
constructor, so all call sites compile unchanged.

Fixes https://github.com/NixOS/nixpkgs/issues/562782

Assisted-by: Claude Code (claude-fable-5)
2026-09-13 22:41:45 +01:00

39 lines
1.0 KiB
Diff

boost 1.91 rewrote boost::optional and made its converting constructor
unconditionally explicit, breaking aggregate brace-init of the radius
member in the profile_point structs. std::optional (C++17) keeps the
non-explicit converting constructor, so call sites compile unchanged.
--- a/src/ifcgeom/profile_helper.h
+++ b/src/ifcgeom/profile_helper.h
@@ -1,6 +1,8 @@
#ifndef PROFILE_HELPER_H
#define PROFILE_HELPER_H
+#include <optional>
+
#include "taxonomy.h"
namespace ifcopenshell {
@@ -8,18 +10,18 @@
namespace geometry {
struct profile_point {
std::array<double, 2> xy;
- boost::optional<double> radius;
+ std::optional<double> radius;
};
struct profile_point_with_edges {
Eigen::Vector2d xy;
- boost::optional<double> radius;
+ std::optional<double> radius;
taxonomy::edge::ptr previous, next;
};
struct profile_point_with_edges_3d {
Eigen::Vector3d xy;
- boost::optional<double> radius;
+ std::optional<double> radius;
taxonomy::edge::ptr previous, next;
};