开发者

Is it possible to specify that an options is required with boost::program_options?

开发者 https://www.devze.com 2023-02-01 00:58 出处:网络
I can use all other public members of the class typed_value define in value_semantic.hpp such as: default_value, implicit_value, zero_tokens, multitoken, notifier, etc.

I can use all other public members of the class typed_value define in value_semantic.hpp such as: default_value, implicit_value, zero_tokens, multitoken, notifier, etc.

But even if the member "required()" is also there, I cannot use it.

I got the error:

‘class boost::program_options::typed_value<std::basic_string<char, std::char_traits<char>, std:开发者_Python百科:allocator<char> >, char>’ has no member named ‘required’ 

Any ideas?


Is your boost version maybe too old? I found required() in the docs for 1.45, but not in the ones for 1.34 - I don't know when it changed.

0

精彩评论

暂无评论...
验证码 换一张
取 消