Skip to content

Add missing rebinding trait to TaggedAllocator#5015

Closed
skeeto wants to merge 1 commit intocppcheck-opensource:mainfrom
skeeto:gcc-13-rebind
Closed

Add missing rebinding trait to TaggedAllocator#5015
skeeto wants to merge 1 commit intocppcheck-opensource:mainfrom
skeeto:gcc-13-rebind

Conversation

@skeeto
Copy link
Copy Markdown

@skeeto skeeto commented Apr 26, 2023

GCC 13 checks for this trait, and Cppcheck cannot be compiled without it. See: https://gcc.gnu.org/gcc-13/porting_to.html#alloc-rebind

GCC 13 checks for this trait, and Cppcheck cannot be compiled without
it. See: https://gcc.gnu.org/gcc-13/porting_to.html#alloc-rebind
@danmar
Copy link
Copy Markdown
Collaborator

danmar commented Apr 30, 2023

thanks! there are some CI issues. i.e. clang-tidy says:

/home/runner/work/cppcheck/cppcheck/lib/smallvector.h:46:5: error: single-argument constructors must be marked explicit to avoid unintentional implicit conversions [google-explicit-constructor,-warnings-as-errors]

Comment thread lib/smallvector.h
{}

template<class U>
TaggedAllocator(const TaggedAllocator<U, N>);
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.

this constructor has no implementation right? Should it be marked with =delete?

Copy link
Copy Markdown
Collaborator

@danmar danmar May 11, 2023

Choose a reason for hiding this comment

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

I can't test it but I wonder if this constructor should be removed and let the other constructor be used instead. What happens if you comment out line 45 and 46 and recompile?

@chrchr-github
Copy link
Copy Markdown
Collaborator

#5146 has been merged.

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.

3 participants