Skip to content

Conversation

@epernod
Copy link
Contributor

@epernod epernod commented Aug 11, 2025

No description provided.

@epernod epernod added pr: enhancement pr: status to review To notify reviewers to review this pull-request labels Aug 11, 2025
@th-skam
Copy link
Collaborator

th-skam commented Aug 12, 2025

Solution for the ubuntu compilation

The problem is not the const but the fact that BaseGeometry::begin() and BaseGeometry::end() return different types.

virtual ElementIterator::SPtr begin(unsigned id = 0) const = 0;
inline const std::type_info& getTypeInfo() const { return begin()->getTypeInfo(); }
BroadPhase * getBroadPhase() { return m_broadPhase; }
inline const BaseGeometry * end() const { return this; }

So, the compiler in ubuntu cannot handle the conversion in the range-based for loops (no idea what the VS compiler does for this)

The previous loops worked because they were using a custom operator!= from ElementIterator

static inline bool operator != (ElementIterator::SPtr & it, const BaseGeometry * /*geo*/) {
return ! it->end();
}

ElementIterator has some functions which are a bit unusual (to me). They don't cooperate with how STL uses iterators. It would be nice to change them but it needs a bit of rework; Small minor changes break functionality. So I reverted the loops back to their previous state which uses the custom operator!=

Copy link
Collaborator

@th-skam th-skam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's ready for me

@epernod epernod added pr: status ready Approved a pull-request, ready to be squashed and removed pr: status to review To notify reviewers to review this pull-request labels Aug 13, 2025
@epernod epernod merged commit af5cb2e into master Aug 13, 2025
4 checks passed
@epernod epernod deleted the add_ci branch August 13, 2025 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: enhancement pr: status ready Approved a pull-request, ready to be squashed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants