Giter Club home page Giter Club logo

qflags's People

Contributors

qartar avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

qflags's Issues

Automatic Help Generation

It would be really helpful if string_option, boolean_option, etc could take in an option description parameter that could be used to print out automatic help information (like Python's argparse)

VS2017 Compilation Error

When compiling with VS2017, the compilation fails due to exception handlers used within MSVC's xlocale header:

2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.25017\bin\HostX64\x64\CL.exe /c /I"C:\src\rainier\3rd-party\qflags\include" /Zi /nologo /W4 /WX /diagnostics:classic /sdl /MP /Od /Ob0 /D WIN32 /D _WINDOWS /D QFLAGS_STATIC /D _UNICODE /D UNICODE /D "CMAKE_INTDIR=\"Debug\"" /D _UNICODE /D UNICODE /Gm- /RTC1 /MTd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"qflags-static.dir\Debug\\" /Fd"qflags-static.dir\Debug\qflags-static.pdb" /Gd /TP /errorReport:prompt   /GR-- "C:\src\....\3rd-party\qflags\src\qflags-all.cpp"
2>cl : Command line warning D9002: ignoring unknown option '/G-'
2>qflags-all.cpp
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.25017\include\xlocale(314): error C2220: warning treated as error - no 'object' file generated
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.25017\include\xlocale(314): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.10.25017\include\limits(211): warning C4577: 'noexcept' used with no exception handling mode specified; termination on exception is not guaranteed. Specify /EHsc

<codecvt> facets are deprecated in C++17

command_line.hpp uses <codecvt> facets to convert Windows's native wide-character strings to UTF-8 however these facets are deprecated starting in C++17 and trying to use them generates deprecation warnings. These warnings can be suppressed by defining _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING but on MSVC this must be done before any standard library header includes which means trying to suppress this warning just inside of the command_line.hpp header is unreliable.

The standard has not implemented anything to replace the functionality so Microsoft recommends using WideCharToMultiByte but this depends on Windows.h which I'd like to avoid.

`command_line` function signature doesn't match standard main

The C and C++ standards both state that main should have the signature int argc, char* argv[]. argv is a non-const array to non-const strings. qflags::command_line takes in a char const* const* for argv, which works fine for passing in the command line args, but it means doing argv = parser.remaining_argv(); doesn't work because the original argv is non-const, but remaining_argv is returning const.

false duplicate result with short args

It looks like the short-argument name ability supports having multi-character values (like -st for example). However, when the parser attempts to add add the short-argument it falsely determines that a multi-character arg equals one of different lengths. For example, if I have two short args with values of:

-s
-st

the parser thinks these are equal. It looks like this is due to the std::equal compare using the min size of the two arguments.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.