Skip to content

noop_snippet: qualify std::vector - #71

Merged
bbiiggppiigg merged 1 commit into
masterfrom
bbiiggppiigg/noop-snippet-std-vector
Nov 23, 2026
Merged

bbiiggppiigg merged 1 commit into
masterfrom
bbiiggppiigg/noop-snippet-std-vector

Conversation

@bbiiggppiigg

Copy link
Copy Markdown
Member

How we found it

dyninst/dyninst#2629 removes the global-scope using-directives and std using-declarations from Dyninst's installed headers. Built against that install, with #70 already merged, this repository still fails in one file:

insertSnippet/noop_snippet.cpp:51:3: error: 'vector' was not declared in this scope

What is wrong

noop_snippet.cpp uses vector unqualified. It compiles today only because the installed PatchCommon.h (included through PatchMgr.h) has using std::vector; at global scope.

How we fixed it

Write std::vector. The file builds against Dyninst with or without dyninst/dyninst#2629, so this can merge first.

Validation

On d87a809, all 50 targets built on mahir (x86_64, gcc), with 0 errors and 0 warnings:

Not built on aarch64 or ppc64le; the change has no architecture-specific part.

🤖 Generated with Claude Code

noop_snippet.cpp uses vector unqualified. It only compiles because
Dyninst's installed PatchCommon.h (included through PatchMgr.h) has
"using std::vector;" at global scope. dyninst/dyninst#2629 removes the
std using-declarations from the installed headers, and with it this
file fails to build:

  noop_snippet.cpp:51:3: error: 'vector' was not declared in this scope

Write std::vector. It compiles against Dyninst with or without that
change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bbiiggppiigg
bbiiggppiigg merged commit 8f99274 into master Nov 23, 2026
1 check passed
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