do_length hides overloaded

Open
#36 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
cli

Research direction

Start with boost/detail/utf8_codecvt_facet.hpp, especially the do_length declaration around line 181, and inspect the related include path from libs/program_options/src/convert.cpp. Reproduce the compiler warning in the reported build configuration, then verify that the warning is eliminated without changing the codecvt behavior.

Written by the indexing model from the issue text.

Description

Got this in a build today (develop):

https://api.travis-ci.org/jobs/292877168/log.txt?deansi=true

In file included from libs/program_options/src/convert.cpp:19:
In file included from ./boost/program_options/detail/utf8_codecvt_facet.hpp:19:
./boost/detail/utf8_codecvt_facet.hpp:181:17: warning: 'boost::program_options::detail::utf8_codecvt_facet::do_length' hides overloaded virtual function [-Woverloaded-virtual]
    virtual int do_length(
                ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.2.0/../../../../include/c++/7.2.0/bits/codecvt.h:453:11: note: hidden overloaded virtual function 'std::codecvt<wchar_t, char, __mbstate_t>::do_length' declared here: type mismatch at 1st parameter ('std::codecvt<wchar_t, char, __mbstate_t>::state_type &' (aka '__mbstate_t &') vs 'const std::mbstate_t &' (aka 'const __mbstate_t &'))
      int do_length(state_type&, const extern_type* __from,
          ^
Dominant language
C++
Stars
136
Forks
117
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/program_options

All issues in boostorg/program_options

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.