badaix / popl Goto Github PK
View Code? Open in Web Editor NEWHeader-only C++ program options parser library
License: MIT License
Header-only C++ program options parser library
License: MIT License
I though popl will help create the bash completion script for me ,which is not
Hi
The latest version produces strange failures on linkage: https://travis-ci.org/MIPT-ILab/mipt-mips/jobs/383377807. IIUC, for methods of Option
class inline
qualifier protects from those error , but it looks like it does not help for ...HelpPrinter
classes.
I suspect the problem is these functions are virtual, but not pure-virtual in the base class. It is impossible to inline a virtual function by definition, so compiler leaves them as is, making their symbols accessible outside. Note that since templates instances are not intended to have an external linkage by default, there are no problems with classes derived from Option
.
$ ./popl --string "foo" --float 1.4
NonOptionArg: foo
NonOptionArg: 1.4
UnknownOptions: --string
UnknownOptions: foo
floatOption - isSet: 0, value: 1.23, reference: 1.23
doubleOption - isSet: 0, value: 3.14159
terminate called after throwing an instance of 'std::out_of_range'
what(): option not set: "-s"
Aborted (Speicherabzug geschrieben)
$ ./popl --string="foo" --float=1.4
UnknownOptions: --string=foo
UnknownOptions: --float=1.4
floatOption - isSet: 0, value: 1.23, reference: 1.23
doubleOption - isSet: 0, value: 3.14159
terminate called after throwing an instance of 'std::out_of_range'
what(): option not set: "-s"
Aborted (Speicherabzug geschrieben)
There seems to be a parsing difference between --foo bar
and --foo=bar
if argument is declared implicit. The former is parsed as "Use --foo
but with the default value" followed by a positional argument with value bar
whereas the later is parsed as expected.
Hi,
CMAKE_CXX_STANDARD does not work with older cmake versions (not sure which one, but 2.4 does not support it); therefore, it builds with C++ < 11 and fails (e.g. "nullptr").
If version is less than 3.1, CXX flags should be set explicitly:
if (CMAKE_VERSION VERSION_LESS "3.1")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
endif ()
else ()
set (CMAKE_CXX_STANDARD 11)
endif ()
Regards
Eugenio
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.