From ad6969d67aee1c7da1646cd188c1d644c961b04a Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 26 Aug 2021 15:57:02 +0200 Subject: [PATCH] fix ambiguity with C++20 The compilation error was test_edge_collapse_Polyhedron_3.cpp(309,1): error C2872: 'format': ambiguous symbol --- .../test_edge_collapse_Polyhedron_3.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3.cpp b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3.cpp index ca29638a015..7c641c5eb69 100644 --- a/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3.cpp +++ b/Surface_mesh_simplification/test/Surface_mesh_simplification/test_edge_collapse_Polyhedron_3.cpp @@ -306,12 +306,12 @@ public : virtual void OnCollected(const Profile& aProfile, const boost::optional& aCost) const { - TEST_TRACE(str (format("Collecting %1% : cost=%2%") % edge2str(aProfile.v0_v1()) % optfloat2str(aCost))); + TEST_TRACE(str (boost::format("Collecting %1% : cost=%2%") % edge2str(aProfile.v0_v1()) % optfloat2str(aCost))); } virtual void OnCollapsing(const Profile& aProfile, const boost::optional& aP) const { - TEST_TRACE(str (format("S %1% - Collapsing %2% : placement=%3%") % mStep % edge2str(aProfile.v0_v1()) % optpoint2str(aP))); + TEST_TRACE(str (boost::format("S %1% - Collapsing %2% : placement=%3%") % mStep % edge2str(aProfile.v0_v1()) % optpoint2str(aP))); //mBefore = create_edge_link(aProfile); } @@ -323,10 +323,10 @@ public : { SurfaceSP lAfter = create_vertex_link(aProfile, aV); - write(mBefore, str(format("%1%.step-%2%-before.off") % mTestCase % mStep)); - write(lAfter , str(format("%1%.step-%2%-after.off") % mTestCase % mStep)); + write(mBefore, str(boost::format("%1%.step-%2%-before.off") % mTestCase % mStep)); + write(lAfter , str(boost::format("%1%.step-%2%-after.off") % mTestCase % mStep)); - REPORT_ERROR(str(format("Resulting surface self-intersects after step %1% (%2% edges left)") % mStep % (aProfile.surface().size_of_halfedges() / 2))); + REPORT_ERROR(str(boost::format("Resulting surface self-intersects after step %1% (%2% edges left)") % mStep % (aProfile.surface().size_of_halfedges() / 2))); } ++mStep;