<commit_before># ⛳ flags
Simple, extensible, header-only C++17 argument parser released into the public domain.


<!-- vim-markdown-toc GFM -->
* [why](#why)
* [requirements](#requirements)
* [api](#api)
  * [get](#get)
  * [get (with default value)](#get-(with-default-value))
  * [positional](#positional)
* [usage](#usage)
  * [example](#example)
  * [another example](#another-example)
  * [extensions](#extensions)
    * [example](#example-1)
  * [command line details](#command-line-details)
    * [key formatting](#key-formatting)
    * [value assignment](#value-assignment)
      * [bools](#bools)
* [testing](#testing)
* [contributing](#contributing)

<!-- vim-markdown-toc -->

# why
Other argument parsers are:
- bloated
- non-extensible
- not modern
- complicated

# requirements
A modern compiler and standard library supporting `optional`, `nullopt`, `string_view`, and `make_array` in `std::experimental`.

# api
`flags::args` exposes three methods:

## get
`std::optional<T> get(const std::string_view& key) const`

Attempts to parse the given key on the command-line. If the string is malformed or the argument was not passed, returns `nullopt`. Otherwise, returns the parsed type as an optional.
<commit_msg>Update requirements.<commit_after># ⛳ flags
Simple, extensible, header-only C++17 argument parser released into the public domain.


<!-- vim-markdown-toc GFM -->
* [why](#why)
* [requirements](#requirements)
* [api](#api)
  * [get](#get)
  * [get (with default value)](#get-with-default-value)
  * [positional](#positional)
* [usage](#usage)
  * [example](#example)
  * [another example](#another-example)
  * [extensions](#extensions)
    * [example](#example-1)
  * [command line details](#command-line-details)
    * [key formatting](#key-formatting)
    * [value assignment](#value-assignment)
      * [bools](#bools)
* [testing](#testing)
* [contributing](#contributing)

<!-- vim-markdown-toc -->

# why
Other argument parsers are:
- bloated
- non-extensible
- not modern
- complicated

# requirements
GCC 7.0 or Clang 4.0.0 at a minimum. This library makes extensive use of `optional`, `nullopt`, and `string_view`.

# api
`flags::args` exposes three methods:

## get
`std::optional<T> get(const std::string_view& key) const`

Attempts to parse the given key on the command-line. If the string is malformed or the argument was not passed, returns `nullopt`. Otherwise, returns the parsed type as an optional.

{'fraction_non_alphanumeric': 0.15800245599672533, 'fraction_numerical': 0.0045026606631191155, 'mean_word_length': 4.6705336426914155, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7670546', 'n_tokens_mistral': 816, 'n_tokens_neox': 747, 'n_words': 221}