Skip to content

Fix macOS CI build break from removed std::result_of in vendored Eigen - #177

Draft
mermerico with Copilot wants to merge 3 commits into
masterfrom
copilot/fix-macos-latest-build-failure
Draft

Fix macOS CI build break from removed std::result_of in vendored Eigen#177
mermerico with Copilot wants to merge 3 commits into
masterfrom
copilot/fix-macos-latest-build-failure

Conversation

Copilot AI commented Jul 5, 2026

Copy link
Copy Markdown

macos-latest-build fails on current macOS toolchains because vendored Eigen still references std::result_of, which is not available in modern C++/libc++ configurations. This PR updates the affected Eigen type-trait path to select a C++17-compatible alternative while preserving backward compatibility.

  • Root-cause area

    • filmulator-gui/core/nlmeans/eigen/Eigen/src/Core/util/Meta.h
    • Failure originated in Eigen’s internal result_of wrapper (no template named 'result_of' in namespace 'std').
  • Targeted compatibility fix

    • Switch to std::invoke_result for C++17+ compilation modes.
    • Keep std::result_of for older language modes.
    • Include MSVC-safe language-mode detection (_MSVC_LANG) alongside __cplusplus.
  • Scope

    • Single-file, localized change in vendored Eigen metaprogramming layer used by nlmeans codepaths.
template<typename T> struct result_of {
#if (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L)
  typedef typename std::invoke_result<T>::type type1;
#else
  typedef typename std::result_of<T>::type type1;
#endif
  typedef typename remove_all<type1>::type type;
};

Copilot AI changed the title [WIP] Fix failing GitHub Actions job macos-latest-build Fix macOS CI build break from removed std::result_of in vendored Eigen Jul 5, 2026
Copilot AI requested a review from mermerico July 5, 2026 04:49
Copilot stopped work on behalf of mermerico due to an error July 5, 2026 04:51
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.

2 participants