-
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ported the tutorial to Outcome v2.2.
- Loading branch information
Showing
26 changed files
with
166 additions
and
92 deletions.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
+++ | ||
title = "`is_move_bitcopying<T>`" | ||
description = "A customisable integral constant type true for `T` types which are move bitcopying safe." | ||
+++ | ||
|
||
A customisable integral constant type true for `T` types which are move bitcopying | ||
safe. As per [P1029 move bitcopying](https://wg21.link/P1029), these are types for | ||
which: | ||
|
||
1. There is an inline, constexpr-available, default constructor. | ||
2. The move constructor has side effects equivalent to `memcpy` of source to destination, | ||
followed by a `memcpy` of a default constructed instance to source. | ||
3. That the destruction of a default constructed instance has no visible | ||
side effects. | ||
|
||
This implies that if you move from a bit copying type, you need not call its | ||
destructor, even if that is a virtual destructor. | ||
|
||
If you opt your types into this trait, Outcome will track moved-from state and | ||
not call the destructor for your type on moved-from instances. Obviously enough | ||
this is, in current C++ standards, undefined behaviour. However it very | ||
significantly improves the quality of codegen during inlining. | ||
|
||
*Overridable*: By template specialisation into the `trait` namespace. | ||
|
||
*Default*: False. Default specialisations exist for: | ||
|
||
- `<outcome/experimental/status_result.hpp>` | ||
- True for `SYSTEM_ERROR2_NAMESPACE::status_code<DomainType>` if trait | ||
`SYSTEM_ERROR2_NAMESPACE::traits::is_move_bitcopying<SYSTEM_ERROR2_NAMESPACE::status_code<DomainType>>::value` | ||
is true. | ||
- True for `SYSTEM_ERROR2_NAMESPACE::errored_status_code<DomainType>` if trait | ||
`SYSTEM_ERROR2_NAMESPACE::traits::is_move_bitcopying<SYSTEM_ERROR2_NAMESPACE::errored_status_code<DomainType>>::value` | ||
is true. | ||
|
||
*Namespace*: `OUTCOME_V2_NAMESPACE::trait` | ||
|
||
*Header*: `<outcome/trait.hpp>` |
6 changes: 3 additions & 3 deletions
6
...t/reference/types/basic_outcome/explicit_valueorerror_converting_constructor.md
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
6 changes: 3 additions & 3 deletions
6
...nt/reference/types/basic_result/explicit_valueorerror_converting_constructor.md
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
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
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
Oops, something went wrong.