Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
positional arguments in boost::program_options
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Evan Driscoll  
View profile  
 More options Jun 13 2012, 6:12 pm
From: Evan Driscoll <drisc...@cs.wisc.edu>
Date: Wed, 13 Jun 2012 17:12:17 -0500
Local: Wed, Jun 13 2012 6:12 pm
Subject: [Boost-users] positional arguments in boost::program_options
Hi, I'm writing a program which will run other programs (think xargs)
and I have the following question.

If I am reading the docs right, I get positional arguments by doing
something like
   1) Make a "normal" argument --arg
   2) Tell it that positional arguments map to --arg

However, if I do this, that means that if someone runs
   my_wrapper  target_program  --arg  a
then the --arg "disappears" because boost::po treats it as an actual
option and not a positional argument.

I can (mostly) get around this by naming all the fake positional
arguments something like --ZZZZarg and assuming no one will ever want to
pass that to another program, but it's a bit unsatisfactory
conceptually. Is there a better way?

Evan

_______________________________________________
Boost-users mailing list
Boost-us...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Evan Driscoll  
View profile  
 More options Jun 13 2012, 6:23 pm
From: Evan Driscoll <drisc...@cs.wisc.edu>
Date: Wed, 13 Jun 2012 17:23:35 -0500
Local: Wed, Jun 13 2012 6:23 pm
Subject: Re: [Boost-users] positional arguments in boost::program_options
On 06/13/2012 05:12 PM, Evan Driscoll wrote:

> I can (mostly) get around this by naming all the fake positional
> arguments something like --ZZZZarg and assuming no one will ever want to
> pass that to another program, but it's a bit unsatisfactory
> conceptually. Is there a better way?

Actually, playing around more, it's not even acceptable: something like

   my_wrapper  target_program --help

will trigger my wrapper's --help option. And I definitely *do* want that
and perhaps some other options that could potentially conflict.

Is there a way to get the behavior I want with Boost or am I out of luck?

Evan
_______________________________________________
Boost-users mailing list
Boost-us...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mateusz Loskot  
View profile  
 More options Jun 14 2012, 4:53 am
From: Mateusz Loskot <mate...@loskot.net>
Date: Thu, 14 Jun 2012 09:53:23 +0100
Local: Thurs, Jun 14 2012 4:53 am
Subject: Re: [Boost-users] positional arguments in boost::program_options
On 13 June 2012 23:23, Evan Driscoll <drisc...@cs.wisc.edu> wrote:

I haven't got back to this issue since I noticed, but it may be related to this:

https://svn.boost.org/trac/boost/ticket/5201

http://stackoverflow.com/questions/4107087/accepting-negative-doubles...

If it is, then it needs AFAIU some not-so-non-intrusive refactoring
within the boost::program_options.

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
_______________________________________________
Boost-users mailing list
Boost-us...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Evan Driscoll  
View profile  
 More options Jun 15 2012, 6:28 pm
From: Evan Driscoll <drisc...@cs.wisc.edu>
Date: Fri, 15 Jun 2012 17:28:26 -0500
Local: Fri, Jun 15 2012 6:28 pm
Subject: Re: [Boost-users] positional arguments in boost::program_options
On 06/13/2012 05:23 PM, Evan Driscoll wrote:

> Actually, playing around more, it's not even acceptable: something like

> my_wrapper target_program --help

> will trigger my wrapper's --help option. And I definitely *do* want that
> and perhaps some other options that could potentially conflict.

> Is there a way to get the behavior I want with Boost or am I out of luck?

After figuring out that a couple other C++ CLI-parsing libraries didn't
do what I want either, I patched Boost and filed a feature request. Both
can be found here:

   https://svn.boost.org/trac/boost/ticket/6991

Evan
_______________________________________________
Boost-users mailing list
Boost-us...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »