• Fixes #82. This allows the help string after the program name to be
    completely replaced by the user.
    Jarryd Beck authored
     
    Browse Code »
  • Fixes #83.
    
    Adds an overload for positional arguments taking a
    `std::initializer_list`. When using an `initializer_list` with one
    argument, the function call is ambiguous matching both `std::string`
    and `std::vector<std::string>`.
    Jarryd Beck authored
     
    Browse Code »
  • Fixes #84. Implicit values are not handled very well. For example:
    
        --foo false true
        --foo --bar
    
    In the first, `false` is an argument to `--foo`, and then `true` is a
    positional argument. In the second, because of the hyphen in `--bar`, `--foo`
    is parsed with its implicit value. This seems inconsistent and unintuitive.
    
    Better is that implicit values *never* consume the next parameter to be
    completely consistent. This means that values with an implicit parameter
    *must* be specified using the `--option=value` form.
    Jarryd Beck authored
     
    Browse Code »

  • The parsing for boolean options was broken by 6c9bae4a07 which added implicit
    and default values, and the ability to parse boolean strings. Having an option
    after the boolean tried to parse that into the boolean instead of as a
    positional parameter.
    
    See #84 for the bug report.
    Jarryd Beck authored
     
    Browse Code »
  • It appears that the `libc++` available on Ubuntu 14.04 is broken and
    doesn't handle the boolean regex correctly. Newer versions appear to be
    correct but I have to work out how to get 14.04 to use it.
    Jarryd Beck authored
     
    Browse Code »




  • Jarryd Beck authored
     
    Browse Code »
  • * Prevent malformed numbers from being parsed as correct numbers.
    
    Fixes #78. If you passed a string for example "test" it would get parsed to 1400.
    The problem was that the parser did not throw an exception when an incorrect char was encountered.
    Also a number without 0x in front with hexadecimal digits in it got parsed.
    The number was treated as a hexadecimal number but it was still calculated with base 10.
    So now before the current char is used, it is checked if it is valid in the current base.
    Furthermore the number 0x0 was not a valid number, it now is a special case in the `integer_pattern`.
    
    * Fixed `integer_pattern` so it works correctly under clang. Added testcase for invalid integers and for 0x0 being a valid number.
    DevCodeOne authored
     
    Browse Code »