Skip to content

std.cfg: use-retval for container member functions#4766

Merged
danmar merged 2 commits intocppcheck-opensource:mainfrom
chrchr-github:chr_UseRet
Feb 6, 2023
Merged

std.cfg: use-retval for container member functions#4766
danmar merged 2 commits intocppcheck-opensource:mainfrom
chrchr-github:chr_UseRet

Conversation

@chrchr-github
Copy link
Copy Markdown
Collaborator

No description provided.

@firewave
Copy link
Copy Markdown
Collaborator

firewave commented Feb 3, 2023

There's several typdefs of std::basic_string we do not support yet:

std::u8string (C++20)
std::u16string (C++11)
std::u32string (C++11)
std::pmr::string (C++17)
std::pmr::wstring (C++17)
std::pmr::u8string (C++20)
std::pmr::u16string (C++17)
std::pmr::u32string (C++17)

See https://en.cppreference.com/w/cpp/string/basic_string

@firewave
Copy link
Copy Markdown
Collaborator

firewave commented Feb 3, 2023

We are also missing cbegin(), cend(), rbegin(), rend(), crbegin(), crend() and the map and set containers. Probably just the tip of the iceberg 🗻.

@chrchr-github
Copy link
Copy Markdown
Collaborator Author

Definitely. Maybe this could be part of the container interface somehow?

@firewave
Copy link
Copy Markdown
Collaborator

firewave commented Feb 3, 2023

Definitely. Maybe this could be part of the container interface somehow?

Yes, it would make much more sense to base it on Named Requirements. That might be quite an undertaking though.

@danmar danmar merged commit d8323c3 into cppcheck-opensource:main Feb 6, 2023
@chrchr-github chrchr-github deleted the chr_UseRet branch March 13, 2023 11:38
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