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

[Compilation fix] Ensure proper aligned_allocator definition by using vector-aligned #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hrobeers
Copy link

https:/jbaayen/vortexje/blob/master/vortexje/solver.cpp#L1003 Fails to compile in recent eigen releases due to improper allocator definition.

A simple fix could be replacing:

vector<vector<Vector3d, Eigen::aligned_allocator<Vector3d> >, Eigen::aligned_allocator<vector<Vector3d> > > wake_velocities;

with:

vector<vector<Vector3d, Eigen::aligned_allocator<Vector3d> >, Eigen::aligned_allocator<vector<Vector3d, Eigen::aligned_allocator<Vector3d> > > > wake_velocities;

However, a more readable and less error prone solution is proposed by this pull request with the introduction of vector_aligned:

  template <typename T>
  using vector_aligned = std::vector<T, Eigen::aligned_allocator<T> >;

…ixes compilation with recent eigen releases)
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

Successfully merging this pull request may close these issues.

1 participant