Skip to content

Use std::move and std::unique_ptr directly in detail/adjacency_list.hpp - #642

Merged
Becheler merged 1 commit into
boostorg:developfrom
varunsha30:issue-593-3.2-adjacency_list
Oct 19, 2026
Merged

Becheler merged 1 commit into
boostorg:developfrom
varunsha30:issue-593-3.2-adjacency_list

Conversation

@varunsha30

Copy link
Copy Markdown
Contributor

Important

New algorithms and API additions need a design issue first. Such a PR is not reviewed until an issue has settled the API and frozen the scope. PRs whose scope grows under review go stale. See How To Contribute an Algorithm.

Motivation

Part of #593

What this PR does

Use std::move and std::unique_ptr directly instead of retaining compatibility paths for older compilers.

Before submitting

  • I searched for an existing PR or issue covering the same change.
  • This PR targets the develop branch.
  • My contribution is licensed under the Boost Software License 1.0.

Kind of change

Tick exactly one. Each kind is reviewed differently, so mixing them in one PR makes the diff difficult to review (why).

  • Reformat (layout only, no token added or removed)
  • Refactor (no observable behavior change)
  • Behavior change (observable to users of the library)
  • No code change (documentation, build, CI, or tooling)

Change category

  • Bug fix
  • New algorithm or API addition
  • Deprecation or removal
  • Performance
  • Tests
  • Documentation
  • Build, CI, or tooling
  • Other (specify below)

@varunsha30
varunsha30 marked this pull request as draft October 9, 2026 20:48
@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Boost dependency footprint vs develop (auto-generated).
PR run 38245928406 vs develop run 38230475111 (1af8f29949).

Header-inclusion weights (graph files pulling each direct dependency in):

No header-inclusion-weight changes.

Transitive Boost modules: 47 → 47 (0)

@varunsha30
varunsha30 marked this pull request as ready for review October 9, 2026 20:52
@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Compiler-warning counts vs develop (auto-generated).
PR run 38245928707 vs develop run 38230475092 (1af8f29949).

Job Baseline After Delta
macos (clang, 14) 253 253 0
macos (clang, 17) 252 252 0
macos (clang, 20) 252 252 0
ubuntu (clang-19, 14) 253 253 0
ubuntu (clang-19, 17) 252 252 0
ubuntu (clang-19, 20) 252 252 0
ubuntu (clang-19, 23) 252 252 0
ubuntu (gcc-14, 14) 349 349 0
ubuntu (gcc-14, 17) 345 345 0
ubuntu (gcc-14, 20) 345 345 0
ubuntu (gcc-14, 23) 345 345 0
windows_msvc_14_3 (msvc-14.3) 937 937 0

@codecov

codecov Bot commented Oct 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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

Becheler
Becheler previously approved these changes Oct 12, 2026

@Becheler Becheler left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@varunsha30 thank you !
Same remark as the previous PR, please do not reformat the file, as it blows up the diff 😄
Otherwise great work thanks again !

@Becheler
Becheler dismissed their stale review October 12, 2026 09:56

Change of mind sorry, this is the most included header in the library and I don't think it's reasonable to include reformating in the PR. Also one important comment disappeared.

@Becheler Becheler left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@varunsha30 thank you for your changes !

This header is the most central piece of code in the library, and I would like to have minimal PRs touching it. Currently most of the git diff comes from clang-format. There is also one important comment that disappeared. Would you be so kind to remove the format changes, reinstate the comment and resubmit ?

Thank you very much 🙏🏽

Let us know if the instruction "Do not run clang-format. We will soon make a repo-wide formatting PR and integrate clang-format in CI." instruction was not clear in #593 . I will probably move it up so it's more obvious/less burried 🤗

Comment thread include/boost/graph/detail/adjacency_list.hpp
@varunsha30
varunsha30 force-pushed the issue-593-3.2-adjacency_list branch 2 times, most recently from 32bcea8 to 16540a2 Compare October 12, 2026 11:46
@varunsha30

Copy link
Copy Markdown
Contributor Author

Hi @Becheler, thank you for pointing out the formatting issues. I have resolved them. VSCode's default behaviour runs clang-format automatically on the codebase. I did not mess with it previously, but now I have disabled it.

@varunsha30
varunsha30 force-pushed the issue-593-3.2-adjacency_list branch from 16540a2 to 1af8f29 Compare October 12, 2026 11:56
@Becheler

Copy link
Copy Markdown
Collaborator

@varunsha30 thank you very much !
Oh that's an unfortunate default of VSC ! That explains why so many first PRs come with clang-format ! I will look into it to see if there is a way to disable this behavior on our side ! Thank you for the report and your changes 🤗

@varunsha30
varunsha30 requested a review from Becheler October 12, 2026 12:32

@Becheler Becheler left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @varunsha30 for your changes and hard work 🙏🏽

@Becheler
Becheler merged commit afc7c1c into boostorg:develop Oct 19, 2026
32 checks passed
@Becheler Becheler changed the title Use std::move and std::unique_ptr directly. Use std::move and std::unique_ptr directly in adjacency_list Oct 19, 2026
@Becheler Becheler changed the title Use std::move and std::unique_ptr directly in adjacency_list Use std::move and std::unique_ptr directly in detail/adjacency_list.hpp Oct 19, 2026
@Becheler Becheler added beginner friendly technical debt Code that works but needs refactoring, cleanup, or modernization. Not user-facing. labels Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beginner friendly technical debt Code that works but needs refactoring, cleanup, or modernization. Not user-facing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants