Modify

Opened 9 years ago

Closed 8 years ago

#2562 closed Bugs (fixed)

warning: type qualifiers ignored on function return type

Reported by: Yang Zhang <yang.boostbugs@…> 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

Attachments (0)

Change History (5)

comment:1 Changed 9 years ago by Yang Zhang <yang.boostbugs@…>

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

comment:2 Changed 9 years ago by Vladimir Prus

Component: program_optionsany
Owner: changed from Vladimir Prus to nasonov

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 Changed 9 years ago by Vladimir Prus

Owner: changed from nasonov to No-Maintainer

comment:4 Changed 8 years ago by Sascha Ochsenknecht <s.ochsenknecht@…>

Cc: s.ochsenknecht@… added
Component: anyprogram_options
Owner: changed from No-Maintainer to Vladimir Prus

Sorry,

but I think it is a problem in program_options, solution can be found in here: #3603

comment:5 Changed 8 years ago by Sascha Ochsenknecht

Resolution: fixed
Status: newclosed

(In [57800]) remove compile warnings, Fixes #2562

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Vladimir Prus.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.