Boost logo

Boost :

Subject: Re: [boost] [program_options] implicit value and non-adjacent tokens
From: Roger Martin (roger_at_[hidden])
Date: 2017-01-25 11:35:14


Will something be done for up coming 1.64 release?

Was this replacing code in boost program options to make it work or
override in an application?

On 01/05/2017 03:20 AM, Benedek Thaler wrote:
> This is a possible fix (subject to typos) :
>
> template <typename T>
> struct greedy_implicit_value : public po::typed_value<T>
> {
> using base = po::typed_value<T>;
>
> greedy_implicit_value(const T& value) : base(nullptr)
> {
> base::implicit_value(value);
> }
>
> bool adjacent_tokens_only() const override { return false; }
> unsigned max_tokens() const override { return 1; }
> };
>
> template <typename T>
> po::typed_value* implicit_value(const T& value)
> {
> return new greedy_implicit_value<T>(value);
> }
>
> Benedek
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk