You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 937b593
Browse filesBrowse the repository at this point in the historyBrowse files
| A model of xref:concepts/property_types/PlanarEmbedding.adoc[PlanarEmbedding].
57
59
58
60
| IN
59
-
| `PlanarFaceVisitor& visitor`
60
-
| A model of xref:visitors/PlanarFaceVisitor.adoc[PlanarFaceVisitor].
61
+
| `PlanarFaceVisitor visitor`
62
+
| A model of xref:visitors/PlanarFaceVisitor.adoc[PlanarFaceVisitor]. The visitor is passed by value, so the algorithm works on a copy. Wrap it in `std::ref(visitor)` to have your own visitor updated in place.
61
63
62
64
| IN
63
65
| `EdgeIndexMap em`
@@ -66,6 +68,46 @@ void planar_face_traversal(
66
68
*Default*: `get(edge_index, g)`
67
69
|===
68
70
71
+
'''
72
+
73
+
[#migrating]
74
+
=== Migrating from `boost::planar_face_traversal`
75
+
76
+
The `boost::planar_face_traversal` overloads are deprecated. They took the visitor by non-const reference, which rejected temporaries and differed from the other BGL algorithms. Removal planned for Boost 1.95. Calls left unchanged then fail to compile instead of silently changing behavior.
77
+
78
+
. Replace `boost::planar_face_traversal` with `boost::graph::planar_face_traversal`. Unqualified calls need qualifying too, since argument dependent lookup only finds the deprecated overloads.
79
+
. If you read the visitor after the call, pass it as `std::ref(visitor)`. Otherwise the algorithm works on a copy and your visitor is left unchanged.
Users can define a class with the Planar Face Visitor interface and pass
6
6
an object of the class to `planar_face_traversal`, thereby
7
7
augmenting the actions taken during the traversal. Note that objects
8
-
passed to `planar_face_traversal` are passed by reference.
8
+
passed to `boost::graph::planar_face_traversal` are copied. Wrap the visitor in `std::ref` to have your own object updated in place. The deprecated `boost::planar_face_traversal` took it by reference. See xref:algorithms/planar/planar_face_traversal.adoc#migrating[the migration steps].
0 commit comments