Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KdTree assert out of range on MSVC #108

Open
AlexeySmolenchuk opened this issue Jan 26, 2025 · 0 comments
Open

KdTree assert out of range on MSVC #108

AlexeySmolenchuk opened this issue Jan 26, 2025 · 0 comments

Comments

@AlexeySmolenchuk
Copy link
Contributor

I'm compiling this project with the MSVC. In debug mode tests asserting with Expression: vector subscript out of range for &_ids[n+size]

    std::nth_element(&_ids[n], &_ids[n+left], &_ids[n+size],
		     ComparePointsById(&_points[0].p[j]));

here
https://github.com/wdas/partio/blob/main/src/lib/core/KdTree.h#L328

I know the algorithm never reaches the _ids[n+size] element, but I can't persuade the compiler.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant