Modify

Ticket #2562 (closed Bugs: fixed)

Opened 5 years ago

Last modified 4 years ago

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

Change History

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

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

comment:2 Changed 5 years ago by vladimir_prus

  • Owner changed from vladimir_prus to nasonov
  • Component changed from program_options to any

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 5 years ago by vladimir_prus

  • Owner changed from nasonov to no-maintainer

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

  • Cc s.ochsenknecht@… added
  • Owner changed from no-maintainer to vladimir_prus
  • Component changed from any to program_options

Sorry,

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

comment:5 Changed 4 years ago by s_ochsenknecht

  • Status changed from new to closed
  • Resolution set to fixed

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

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


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

 
Note: See TracTickets for help on using tickets.