Skip to content

[Fix][Cross-Platform] Replace <types.h> with <cstddef> and remove explicit const from std::map key for macOS (backport #3548) - #3921

Closed
mergify[bot] wants to merge 1 commit into
jazzyfrom
mergify/bp/jazzy/pr-3548
Closed

mergify[bot] wants to merge 1 commit into
jazzyfrom
mergify/bp/jazzy/pr-3548

Conversation

@mergify

@mergify mergify Bot commented Oct 8, 2026

Copy link
Copy Markdown

Description

This PR fixes a compilation issue on macOS caused by the use of const std::pair<std::string, std::string> as the key type in a std::map.

Details:

  • The original code used const std::pair as the key type:
using DistanceMap = std::map<const std::pair<std::string, std::string>, std::vector<DistanceResultsData>>;
  • This caused assignment errors because std::map already treats keys as const internally.
  • Explicitly adding const leads to conflicts with internal map operations and strict compiler checks.
  • The fix removes the explicit const qualifier from the key type:
using DistanceMap = std::map<std::pair<std::string, std::string>, std::vector<DistanceResultsData>>;
  • This change ensures compatibility across platforms, including macOS, and adheres to the C++ standard container usage best practices.

[Fix] Use cross-platform <cstddef> instead of <types.h>

Description

Replaces the non-standard <types.h> header with the standard <cstddef> to ensure size_t is available on all platforms. This fixes compilation issues on macOS while remaining compatible with Linux and other platforms.

Changes

- #include <types.h>
+ #include <cstddef>  // for size_t, cross-platform
<hr>This is an automatic backport of pull request #3548 done by [Mergify](https://mergify.com).

* Remove const specifier from key in DistanceMap = std::map
* Use cross-platform <cstddef> instead of <types.h>

Signed-off-by: Dhruv Patel <[email protected]>
(cherry picked from commit c639959)
@mergify mergify Bot closed this Oct 8, 2026
@mergify
mergify Bot deleted the mergify/bp/jazzy/pr-3548 branch October 8, 2026 14:46
@github-project-automation github-project-automation Bot moved this to ✅ Done in MoveIt Oct 8, 2026
@coderabbitai

coderabbitai Bot commented Oct 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 78d856d1-18bd-472c-bb34-d99d1e91821c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46.25%. Comparing base (a73060f) to head (14962f6).

Additional details and impacted files
@@            Coverage Diff             @@
##            jazzy    #3921      +/-   ##
==========================================
- Coverage   46.28%   46.25%   -0.02%     
==========================================
  Files         718      718              
  Lines       59182    59190       +8     
  Branches     7600     7600              
==========================================
- Hits        27387    27374      -13     
- Misses      31630    31650      +20     
- Partials      165      166       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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