Opened 14 years ago
Closed 13 years ago
#2562 closed Bugs (fixed)
warning: type qualifiers ignored on function return type
| Reported by: | Owned by: | Vladimir Prus | |
|---|---|---|---|
| Milestone: | Boost 1.38.0 | Component: | program_options |
| Version: | Boost 1.37.0 | Severity: | Problem |
| Keywords: | Cc: | s.ochsenknecht@… |
Description
Sample source:
#include <boost/program_options.hpp>
namespace po = boost::program_options;
int main() {
int x;
po::options_description desc("");
desc.add_options()("x,x", po::value<int>(&x)->default_value(2), "x");
return 0;
}
Building with -Wignored-qualifiers on g++ 4.3.2 on Ubuntu 8.10 x86_64.
/home/yang/work/boost/boost/any.hpp: In member function âvoid boost::program_options::typed_value<T, charT>::notify(const boost::any&) const [with T = int, charT = char]â: boost_program_options_warning.cc:8: instantiated from here /home/yang/work/boost/boost/any.hpp:200: warning: type qualifiers ignored on function return type
Change History (5)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
| Component: | program_options → any |
|---|---|
| Owner: | changed from to |
This is problem with boost::any, not program_options, so I'm changing component. Note that IIUC, boost::any is not actively maintained, so I'm not sure if this will be fixed soon. Note also that I don't have any opinion whether this warning is a actual problem with boost::any, or a bogus warning.
comment:3 by , 14 years ago
| Owner: | changed from to |
|---|
comment:4 by , 13 years ago
| Cc: | added |
|---|---|
| Component: | any → program_options |
| Owner: | changed from to |
Sorry,
but I think it is a problem in program_options, solution can be found in here: #3603
comment:5 by , 13 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.

Whoops, I meant to mark this as a bug in svn trunk.