[med-svn] [Git][med-team/libargs][upstream] New upstream version 6.2.6

Andreas Tille (@tille) gitlab at salsa.debian.org
Sun Aug 29 16:54:57 BST 2021



Andreas Tille pushed to branch upstream at Debian Med / libargs


Commits:
d5df45bb by Andreas Tille at 2021-08-29T17:28:52+02:00
New upstream version 6.2.6
- - - - -


4 changed files:

- CMakeLists.txt
- README.md
- appveyor.yml
- args.hxx


Changes:

=====================================
CMakeLists.txt
=====================================
@@ -20,6 +20,10 @@
 # IN THE SOFTWARE.
 
 cmake_minimum_required(VERSION 3.2)
+set(ARGS_MAIN_PROJECT OFF)
+if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
+    set(ARGS_MAIN_PROJECT ON)
+endif()
 project(args CXX)
 
 option(ARGS_BUILD_EXAMPLE "Build example" ON)
@@ -30,12 +34,14 @@ target_include_directories(args INTERFACE
 	$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}>
 	$<INSTALL_INTERFACE:include>)
 
-install(FILES args.hxx DESTINATION include)
-install(TARGETS args EXPORT args-targets)
-install(EXPORT args-targets
-  FILE args-config.cmake
-  NAMESPACE taywee::
-  DESTINATION lib/cmake/args)
+if(ARGS_MAIN_PROJECT)
+    install(FILES args.hxx DESTINATION include)
+    install(TARGETS args EXPORT args-targets)
+    install(EXPORT args-targets
+        FILE args-config.cmake
+        NAMESPACE taywee::
+        DESTINATION lib/cmake/args)
+endif()
 
 if (ARGS_BUILD_EXAMPLE)
     add_executable(gitlike examples/gitlike.cxx)


=====================================
README.md
=====================================
@@ -8,8 +8,7 @@
 [![Coverage Status](https://coveralls.io/repos/github/Taywee/args/badge.svg?branch=master)](https://coveralls.io/github/Taywee/args?branch=master)
 [![Read the Docs](https://img.shields.io/readthedocs/pip.svg)](https://taywee.github.io/args)
 
-A simple, small, flexible, single-header C++11 argument parsing library, in
-fewer than 2K lines of code.
+A simple, small, flexible, single-header C++11 argument parsing library.
 
 This is designed to appear somewhat similar to Python's argparse, but in C++,
 with static type checking, and hopefully a lot faster (also allowing fully


=====================================
appveyor.yml
=====================================
@@ -1,4 +1,5 @@
 os:
+    - Visual Studio 2019
     - Visual Studio 2017
     - Visual Studio 2015
 


=====================================
args.hxx
=====================================
@@ -33,10 +33,10 @@
 #ifndef ARGS_HXX
 #define ARGS_HXX
 
-#define ARGS_VERSION "6.2.3"
+#define ARGS_VERSION "6.2.6"
 #define ARGS_VERSION_MAJOR 6
 #define ARGS_VERSION_MINOR 2
-#define ARGS_VERSION_PATCH 3
+#define ARGS_VERSION_PATCH 6
 
 #include <algorithm>
 #include <iterator>
@@ -50,6 +50,7 @@
 #include <unordered_set>
 #include <type_traits>
 #include <cstddef>
+#include <cctype>
 #include <iostream>
 
 #if defined(_MSC_VER) && _MSC_VER <= 1800
@@ -227,9 +228,9 @@ namespace args
         std::istringstream stream(in);
         std::string::size_type indent = 0;
 
-        for (char c : in)
+        for (auto c : in)
         {
-            if (!isspace(c))
+            if (!std::isspace(static_cast<unsigned char>(c)))
             {
                 break;
             }
@@ -463,7 +464,7 @@ namespace args
             Matcher(std::initializer_list<EitherFlag> in) :
                 Matcher(EitherFlag::GetShort(in), EitherFlag::GetLong(in)) {}
 
-            Matcher(Matcher &&other) : shortFlags(std::move(other.shortFlags)), longFlags(std::move(other.longFlags))
+            Matcher(Matcher &&other) noexcept : shortFlags(std::move(other.shortFlags)), longFlags(std::move(other.longFlags))
             {}
 
             ~Matcher() {}
@@ -2016,9 +2017,9 @@ namespace args
                 if (!ProglinePostfix().empty())
                 {
                     std::string line;
-                    for (char c : ProglinePostfix())
+                    for (auto c : ProglinePostfix())
                     {
-                        if (isspace(c))
+                        if (std::isspace(static_cast<unsigned char>(c)))
                         {
                             if (!line.empty())
                             {



View it on GitLab: https://salsa.debian.org/med-team/libargs/-/commit/d5df45bbf660c52b896b0f21a313e8cd5539d0d3

-- 
View it on GitLab: https://salsa.debian.org/med-team/libargs/-/commit/d5df45bbf660c52b896b0f21a313e8cd5539d0d3
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20210829/38ae9be5/attachment-0001.htm>


More information about the debian-med-commit mailing list