Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve compiler warnings #302

Merged
merged 3 commits into from
May 21, 2024
Merged

Resolve compiler warnings #302

merged 3 commits into from
May 21, 2024

Conversation

jengelh
Copy link
Contributor

@jengelh jengelh commented Apr 23, 2024

No description provided.

C++11 is mandatory since commit v0.9.2-48-g8564b2f8, therefore we can
exercise the =delete keyword in class declarations to prohibit
copying.
context.hpp:109:26: warning: "virtual vmime::context&
vmime::context::operator=(const vmime::context&)’ was hidden
[-Woverloaded-virtual=]
  109 |         virtual context& operator=(const context& ctx);
      |                          ^~~~~~~~
generationContext.hpp:153:28: note:   by ‘vmime::generationContext&
vmime::generationContext::operator=(const vmime::generationContext&)’
  153 |         generationContext& operator=(const generationContext& ctx);
      |                            ^~~~~~~~

AFAICS, there is no point in having "virtual" on an assignment operator.
Any derived classes' operator= has different signature anyway.
It is also the only class with a virtual operator=, so that's an indicator
for oddness as well.
encoding.cpp: In static member function "static const vmime::encoding
vmime::encoding::decideImpl(std::__cxx11::basic_string<char>::const_iterator,
std::__cxx11::basic_string<char>::const_iterator)":

encoding.cpp:161:29: warning: "std::binder2nd<_Operation>
std::bind2nd(const _Operation&, const _Tp&) [with _Operation =
less<unsigned char>; _Tp = int]" is deprecated: use "std::bind" instead
[-Wdeprecated-declarations]
  161 |                 std::bind2nd(std::less<unsigned char>(), 127)
      |                 ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

C++11 is mandatory, so just use a lambda already.
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.

None yet

2 participants