From b3f83f67caf750748833957f4837e293fbee02fd Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Thu, 9 Jul 2026 23:28:41 +1000 Subject: [PATCH] ifcgeomserver: test iterator->next() via operator bool (fix ambiguous !=) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Iterator::next() now returns express::Base (data-model branch). Comparing it against 0 is ambiguous: 0 converts to Base via the pointer ctor while Base converts to int via operator bool, so both operator!=(int,int) and Base::operator!= are candidates. Use an explicit truthiness test — an empty Base signals end-of-iteration. Co-Authored-By: Claude Opus 4.8 --- src/ifcgeomserver/IfcGeomServer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcgeomserver/IfcGeomServer.cpp b/src/ifcgeomserver/IfcGeomServer.cpp index 25d7d5e0eb..65d55c944e 100644 --- a/src/ifcgeomserver/IfcGeomServer.cpp +++ b/src/ifcgeomserver/IfcGeomServer.cpp @@ -629,7 +629,7 @@ int main () { } case NEXT: { Next n; n.read(std::cin); - has_more = iterator->next() != 0; + has_more = static_cast(iterator->next()); if (!has_more) { delete file; delete iterator;