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

Fix EigenToPy/EigenFromPy on Windows #462

Merged
merged 4 commits into from
Apr 25, 2024

Conversation

jorisv
Copy link
Contributor

@jorisv jorisv commented Apr 24, 2024

On Windows EigenToPy/EigenFromPy are not defined (only specialized) to avoid a CL compiler issue.

If we make the following declaration:

template <typename MatType,
          typename Scalar =
              typename boost::remove_reference<MatType>::type::Scalar>
struct EigenToPy;

CL complain that MatType is an undeclared identifier.

To avoid that, a first hack was to not define but only specialize EigenToPy (same for EigenFromPy) on Windows:

template <typename EigenType>
struct EigenToPy<EigenType,
                 typename boost::remove_reference<EigenType>::type::Scalar>
    : eigen_to_py_impl<EigenType> {
};

Unfortunately, this hack prevent to specialize EigenToPy for custom scalar type with CL.

This PR revert this hack and fix the first issue by moving the default Scalar definition in the EigenToPy definition.

@jorisv jorisv self-assigned this Apr 24, 2024
@jorisv jorisv requested a review from ManifoldFR April 24, 2024 15:56
@jorisv jorisv marked this pull request as ready for review April 24, 2024 16:26
@jcarpent jcarpent merged commit 59fd1a6 into stack-of-tasks:devel Apr 25, 2024
29 checks passed
@jorisv jorisv deleted the topic/fix_eigen_tofrom_py branch April 25, 2024 07:51
nim65s added a commit to nim65s/robotpkg that referenced this pull request Jun 6, 2024
Updates:
    ## [3.6.0] - 2024-06-05

    ### Added
    - Added a deprecation call policy shortcut ([466](stack-of-tasks/eigenpy#466))

    ### Fixed
    - Fix register_symbolic_link_to_registered_type() for multiple successive registrations ([471](stack-of-tasks/eigenpy#471))

    ## [3.5.1] - 2024-04-25

    ### Fixed
    - Allow EigenToPy/EigenFromPy specialization with CL compiler ([462](stack-of-tasks/eigenpy#462))
    - Fix missing include for boost >= 1.85  ([464](stack-of-tasks/eigenpy#464))
nim65s added a commit to nim65s/robotpkg that referenced this pull request Jun 20, 2024
Updates:
    ## [3.6.0] - 2024-06-05

    ### Added
    - Added a deprecation call policy shortcut ([466](stack-of-tasks/eigenpy#466))

    ### Fixed
    - Fix register_symbolic_link_to_registered_type() for multiple successive registrations ([471](stack-of-tasks/eigenpy#471))

    ## [3.5.1] - 2024-04-25

    ### Fixed
    - Allow EigenToPy/EigenFromPy specialization with CL compiler ([462](stack-of-tasks/eigenpy#462))
    - Fix missing include for boost >= 1.85  ([464](stack-of-tasks/eigenpy#464))
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.

None yet

2 participants