-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Small fixed and some documentation (#95)
* extend CODEOWNERS and improve the suppression header * added documentation and examples for just*.
- Loading branch information
1 parent
c2e0553
commit c32b4fc
Showing
8 changed files
with
223 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
# Codeowners for reviews on PRs | ||
|
||
* @dietmarkuehl @neatudarius | ||
* @dietmarkuehl @camio @neatudarius | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// examples/doc-just.cpp -*-C++-*- | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
#include <beman/execution26/execution.hpp> | ||
#include <cassert> | ||
#include <string> | ||
namespace ex = beman::execution26; | ||
using namespace std::string_literals; | ||
|
||
int main() { | ||
auto result = ex::sync_wait(ex::just(17, "hello"s, true)); | ||
assert(result); | ||
assert(*result == std::tuple(17, "hello"s, true)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// examples/doc-just_error.cpp -*-C++-*- | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
#include <beman/execution26/execution.hpp> | ||
#include <system_error> | ||
#include <cassert> | ||
namespace ex = beman::execution26; | ||
|
||
int main() { | ||
bool had_error{false}; | ||
auto result = ex::sync_wait(ex::just_error(std::error_code(17, std::system_category())) | | ||
ex::upon_error([&](std::error_code ec) { | ||
assert(ec.value() == 17); | ||
had_error = true; | ||
})); | ||
assert(had_error); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// examples/doc-just_stopped.cpp -*-C++-*- | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
#include <beman/execution26/execution.hpp> | ||
#include <system_error> | ||
#include <cassert> | ||
#include <iostream> //-dk:TODO remove | ||
namespace ex = beman::execution26; | ||
|
||
int main() { | ||
bool stopped{false}; | ||
|
||
auto result = ex::sync_wait(ex::just_stopped() | ex::upon_stopped([&] { stopped = true; })); | ||
assert(stopped); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters