diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml
index 551b25e..d23f62f 100644
--- a/.github/workflows/build_and_test.yml
+++ b/.github/workflows/build_and_test.yml
@@ -21,7 +21,7 @@ on:
# When manually running this workflow:
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
debug_enabled:
- description: 'Enable tmate debugging'
+ description: "Enable tmate debugging"
type: boolean
default: false
@@ -31,7 +31,9 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
- os: ["macos-latest", "ubuntu-latest", "windows-latest"]
+ # 'windows-latest' (windows-2022) is broken due to a github runner update.
+ # See https://github.com/actions/runner-images/issues/7662 for more details.
+ os: ["macos-latest", "ubuntu-latest", "windows-2019"]
defaults:
run:
shell: bash
@@ -40,7 +42,7 @@ jobs:
# Checkout the repository under $GITHUB_WORKSPACE.
- uses: actions/checkout@v2
with:
- submodules: 'recursive'
+ submodules: "recursive"
- name: Build
run: |
diff --git a/.github/workflows/check_code_style.yml b/.github/workflows/check_code_style.yml
index a2ae536..5dc3be1 100644
--- a/.github/workflows/check_code_style.yml
+++ b/.github/workflows/check_code_style.yml
@@ -27,7 +27,7 @@ jobs:
# style checks.
- uses: actions/checkout@v2
with:
- submodules: 'recursive'
+ submodules: "recursive"
# Call the composite action to check files
# for correct code style. This action (action.yml)
diff --git a/.mergequeue/config.yml b/.mergequeue/config.yml
index 9e4cb62..d4d94e5 100644
--- a/.mergequeue/config.yml
+++ b/.mergequeue/config.yml
@@ -2,9 +2,9 @@ version: 1.0.0
merge_rules:
labels:
trigger: mergequeue-ready
- skip_line: ''
+ skip_line: ""
merge_failed: mergequeue-failed
- skip_delete_branch: ''
+ skip_delete_branch: ""
update_latest: true
delete_branch: true
use_rebase: true
@@ -13,10 +13,10 @@ merge_rules:
preconditions:
number_of_approvals: 1
required_checks:
- - check_code_style (ubuntu-latest)
- - Build and Test (windows-latest)
- - Build and Test (ubuntu-latest)
- - Build and Test (macos-latest)
+ - check_code_style (ubuntu-latest)
+ - Build and Test (windows-latest)
+ - Build and Test (ubuntu-latest)
+ - Build and Test (macos-latest)
use_github_mergeability: false
conversation_resolution_required: true
merge_mode:
@@ -24,7 +24,7 @@ merge_rules:
parallel_mode: null
auto_update:
enabled: false
- label: ''
+ label: ""
max_runs_for_update: 0
merge_commit:
use_title_and_body: false
@@ -32,5 +32,5 @@ merge_rules:
name: squash
override_labels:
squash: mergequeue-squash
- merge: ''
+ merge: ""
rebase: mergequeue-rebase
diff --git a/README.md b/README.md
index ed2bb17..4b938a1 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@ Follows a "repos/deps" pattern (in order to help with recursive dependencies). T
1. Copy `bazel/repos.bzl` into your repository at `3rdparty/stout/repos.bzl` and add an empty `BUILD` (or `BUILD.bazel`) to `3rdparty/stout` as well.
-2. Copy all of the directories from `3rdparty` that you ***don't*** already have in ***your*** repository's `3rdparty` directory.
+2. Copy all of the directories from `3rdparty` that you **_don't_** already have in **_your_** repository's `3rdparty` directory.
3. Either ... add the following to your `WORKSPACE` (or `WORKSPACE.bazel`):
@@ -18,7 +18,7 @@ load("@com_github_3rdparty_stout//bazel:deps.bzl", stout_deps="deps")
stout_deps()
```
-Or ... to simplify others depending on ***your*** repository, add the following to your `repos.bzl`:
+Or ... to simplify others depending on **_your_** repository, add the following to your `repos.bzl`:
```bazel
load("//3rdparty/stout:repos.bzl", stout="repos")
@@ -40,7 +40,7 @@ def deps():
5. Repeat the steps starting at (1) at the desired version of this repository that you want to use.
-------------------------
+---
Stout is a header-only C++ library. Simply add the `include` folder to your include path (i.e., `-I/path/to/stout/include`) during compilation (eventually we plan to support installation).
@@ -50,26 +50,25 @@ Stout provides and heavily leverages some monadic structures including [Option](
Note that the library is designed to completely avoid exceptions. See [exceptions](#exceptions) for further discussion.
-* Option, Some, and None
-* Try, Result, and Error
-* Nothing
-* fs::
-* gzip::
-* JSON::
-* `jsonify`
-* lambda::
-* net::
-* os::
-* path::
-* proc::
-* protobuf::
-* strings::
-* Command Line Flags
-* Collections
-* Miscellaneous
-* Testing
-* Philosophy
-
+- Option, Some, and None
+- Try, Result, and Error
+- Nothing
+- fs::
+- gzip::
+- JSON::
+- `jsonify`
+- lambda::
+- net::
+- os::
+- path::
+- proc::
+- protobuf::
+- strings::
+- Command Line Flags
+- Collections
+- Miscellaneous
+- Testing
+- Philosophy
@@ -77,28 +76,28 @@ Note that the library is designed to completely avoid exceptions. See [exception
The `Option` type provides a safe alternative to using `nullptr`. An `Option` can be constructed explicitly or implicitly:
-~~~{.cpp}
+```{.cpp}
Option o(true);
Option o = true;
-~~~
+```
You can check if a value is present using `Option::isSome()` and `Option::isNone()` and retrieve the value using `Option::get()`:
-~~~{.cpp}
+```{.cpp}
if (!o.isNone()) {
... o.get() ...
}
-~~~
+```
-Note that the current implementation *copies* the underlying values (see [Philosophy](#philosophy) for more discussion). Nothing prevents you from using pointers, however, *the pointer will not be deleted when the Option is destructed*:
+Note that the current implementation _copies_ the underlying values (see [Philosophy](#philosophy) for more discussion). Nothing prevents you from using pointers, however, _the pointer will not be deleted when the Option is destructed_:
-~~~{.cpp}
+```{.cpp}
Option o = new std::string("hello world");
-~~~
+```
The `None` type acts as "syntactic sugar" to make using [Option](#option) less verbose. For example:
-~~~{.cpp}
+```{.cpp}
Option foo(const Option& o)
{
return None(); // Can use 'None' here.
@@ -111,18 +110,17 @@ The `None` type acts as "syntactic sugar" to make using [Option](#option) less v
...
Option o = None(); // Or here.
-~~~
+```
Similar to `None`, the `Some` type can be used to construct an `Option` as well. In most circumstances `Some` is unnecessary due to the implicit `Option` constructor, however, it can still be useful to remove any ambiguities as well as when embedded within collections:
-~~~{.cpp}
+```{.cpp}
Option